body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    height: 100vh;
    color: #667eea;
    box-sizing: border-box;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    width: 100vw;
    overflow-x: auto;
}

#calendar {
    margin-bottom: 0;
    height: auto;
    max-height: 100vh;
    overflow-y: auto;
    border: none;
    border-radius: 8px;
    padding: 16px;
    box-sizing: border-box;
    background: none;
    scrollbar-width: none;
    /* Firefox */
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    /* Performance optimizations */
    will-change: scroll-position;
    transform: translateZ(0);
    -webkit-overflow-scrolling: touch;
}

#calendar::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari */
}

.calendar-container::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari */
}


.month-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 8px;
    justify-content: flex-start;
    /* Prevent layout thrashing */
    contain: layout;
}

.month-label {
    color: #ffffff;
    text-align: left;
    display: block;
    padding-bottom: 8px;
    margin-top: 8px;
}


.calendar-day {
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid #e0e0e0;
    background: transparent;
    color: white;
    border: 1px solid #0025cc;
    font-weight: normal;
    cursor: pointer;
    transition: transform 0.1s ease-out;
    position: relative;
    padding: 7px;
    border-radius: 50%;
    box-sizing: border-box;
    /* Performance optimizations */
    contain: layout style;
    transform: translateZ(0);
}

.calendar-day:hover {
    transform: scale(0.9);
    z-index: 1;
}

.calendar-day.selected {
    border: 1px solid #0025cc;
    transform: scale(0.9);
    background: white;
    color: #5d5d5d;
    opacity: 0.4;

}


.calendar-day.in-range {
    background: white;
    color: #5d5d5d;
    border: 2px solid #e0e0e0;
    font-weight: bold;
}

.calendar-days-in-window {
    font-size: 0.7em;
    margin-top: 2px;
    opacity: 0.7;
}


.schengen-over {
    background-color: #e74c3c !important;
    color: #fff;
}


.calendar-day.today {
    position: relative;
}

.calendar-day.today::after {
    content: "";
    position: absolute;
    top: -6px;
    left: -6px;
    width: calc(100% + 12px);
    height: calc(100% + 12px);
    border: 4px solid #27ae60;
    border-radius: 50%;
    pointer-events: none;
    box-sizing: border-box;
}


.icon-buttons {
    position: fixed;
    bottom: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    z-index: 1000;
}


.reset-button,
.info-button,
.export-button,
.import-button {
    width: 48px;
    height: 48px;
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    cursor: pointer;
    outline: none;
    display: block;
}

.export-button svg,
.import-button svg {
    display: block;
    width: 100%;
    height: 100%;
}

.export-button:hover,
.import-button:hover {
    filter: brightness(0.95) drop-shadow(0 2px 8px #667eea33);
    transform: scale(0.9);
}

.info-button svg {
    display: block;
    width: 100%;
    height: 100%;
}

.info-button:hover {
    filter: brightness(0.95) drop-shadow(0 2px 8px #667eea33);
    transform: scale(0.9);
}

.info-popover {
    position: absolute;
    right: 60px;
    bottom: 0;
    min-width: 260px;
    max-width: 90vw;
    background: #fff;
    color: #667eea;
    border-radius: 12px;
    box-shadow: 0 4px 24px #667eea33;
    padding: 20px 24px 16px 24px;
    animation: popover-expand 0.25s cubic-bezier(.4, 2, .6, 1) forwards;
    z-index: 1100;
}

@keyframes popover-expand {
    0% {
        opacity: 0;
        transform: scale(0.7) translateY(20px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.info-content h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.2em;
}

.info-content p {
    margin-bottom: 16px;
    font-size: 1em;
}

.close-info {
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 16px;
    cursor: pointer;
    font-size: 1em;
    margin-top: 8px;
}

.reset-button svg {
    display: block;
    width: 100%;
    height: 100%;
}

.reset-button:hover {
    filter: brightness(0.95) drop-shadow(0 2px 8px #667eea33);
    transform: scale(0.9);

}

/* Plain text button for info popover */
.plain-text-btn {
    background: none;
    border: none;
    color: #667eea;
    font-size: 1em;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.15s;
}

.plain-text-btn:hover {
    color: #3b489c;
    text-decoration: underline;
}

/* Privacy Policy Page Styles */
.privacy-content {
    background: #fff;
    color: #333;
    border-radius: 12px;
    box-shadow: 0 4px 24px #667eea33;
    padding: 32px 24px;
    max-width: 700px;
    margin: 48px auto;
}