* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #e9ecef;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.calendar-wrapper {
    width: 320px;
    background: #d8d3c8;
    border-radius: 10px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
    padding-bottom: 8px;
    position: relative;
    perspective: 1000px;
}

/* Główka zrywaka */
.calendar-header {
    background: linear-gradient(135deg, #2b2d42, #1a1b26);
    color: #fff;
    padding: 16px 20px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid #8d99ae;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    position: relative;
    z-index: 2;
}

.header-text {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 1.5px;
}

.rivet {
    width: 12px;
    height: 12px;
    background: radial-gradient(circle at 30% 30%, #e0e0e0, #757575);
    border-radius: 50%;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.6);
}

/* Kartka papieru */
.calendar-page {
    background: #fdfbf7;
    margin: 0 6px;
    padding: 15px 20px 20px;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.12), inset 0 -2px 5px rgba(0,0,0,0.03);
    cursor: pointer;
    position: relative;
    transform-origin: top center;
    transition: transform 0.45s cubic-bezier(0.55, 0.085, 0.68, 0.53), opacity 0.45s ease;
    user-select: none;
}

/* Linia perforacji do odrywania */
.perforation {
    border-top: 2px dashed #ccc;
    margin: -5px -20px 12px -20px;
}

.top-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 10px;
}

/* Główna data */
.main-date {
    text-align: center;
    padding: 10px 0;
    color: #212529;
}

.main-date.is-red {
    color: #d90429;
}

.day-number {
    font-size: 5.5rem;
    font-weight: 800;
    line-height: 1;
}

.day-name {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-top: 5px;
}

.holiday-name {
    font-size: 0.85rem;
    font-weight: 600;
    min-height: 18px;
    margin-top: 4px;
}

/* Wschód i zachód słońca */
.sun-times {
    display: flex;
    justify-content: space-around;
    background: #f1ede4;
    padding: 8px;
    border-radius: 6px;
    margin: 12px 0;
    font-size: 0.85rem;
    color: #495057;
}

/* Imieniny */
.namedays {
    text-align: center;
    margin-bottom: 14px;
    font-size: 0.9rem;
}

.namedays .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #8d99ae;
    font-weight: 700;
}

.namedays p {
    color: #2b2d42;
    font-weight: 600;
    margin-top: 2px;
}

/* Cytat dnia */
.quote-box {
    border-top: 1px solid #e9ecef;
    padding-top: 12px;
    font-style: italic;
    font-size: 0.85rem;
    color: #555;
    text-align: center;
    line-height: 1.4;
}

.tear-hint {
    text-align: center;
    font-size: 0.7rem;
    color: #adb5bd;
    margin-top: 14px;
}

/* Animacja odrywania kartki */
.calendar-page.tearing {
    transform: rotateX(-65deg) translateY(60px) rotateZ(4deg);
    opacity: 0;
}