* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: clamp(10px, 1.3vw, 16px);
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #ffffff;
    color: #333;
    line-height: 1.6;
    padding: clamp(10px, 1.5vw, 20px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(10px, 1.5vw, 20px);
}

/* Header */
header {
    text-align: center;
    margin-bottom: clamp(15px, 2.5vw, 30px);
}

.logo {
    max-width: 12vw;
    height: auto;
    margin-bottom: 1.5vw;
}

h1 {
    font-size: clamp(1.5em, 3vw, 2.5em);
    color: #1a1a1a;
    margin-bottom: clamp(5px, 0.8vw, 10px);
}

/* Navigation */
nav {
    margin: clamp(15px, 2.5vw, 30px) 0;
    text-align: center;
}

.nav-buttons {
    display: flex;
    justify-content: center;
    gap: clamp(8px, 1.2vw, 15px);
    flex-wrap: wrap;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(8px, 1vw, 12px) clamp(16px, 2vw, 24px);
    background-color: #005bb5;
    color: white;
    text-decoration: none;
    border-radius: clamp(3px, 0.4vw, 5px);
    font-size: 1em;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
    min-width: clamp(120px, 14vw, 170px);
    flex: 0 0 auto;
    text-align: center;
    white-space: nowrap;
    box-sizing: border-box;
}

.btn:hover {
    background-color: #004494;
}

.btn-secondary {
    background-color: #d32f2f;
}

.btn-secondary:hover {
    background-color: #b71c1c;
}

/* Calendar */
.calendar-wrapper {
    background: white;
    padding: clamp(15px, 2.5vw, 30px);
    border-radius: clamp(5px, 0.8vw, 10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: clamp(15px, 2.5vw, 30px);
}

.year-header {
    text-align: center;
    font-size: clamp(1.5em, 2.5vw, 2em);
    margin-bottom: clamp(15px, 2.5vw, 30px);
    color: #1a1a1a;
}

.year-warning {
    text-align: center;
    color: #d32f2f;
    font-size: 0.9em;
    margin-bottom: clamp(10px, 1.5vw, 20px);
    padding: clamp(5px, 0.8vw, 10px);
    background-color: #ffebee;
    border-radius: clamp(3px, 0.4vw, 5px);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(10px, 1.5vw, 20px);
    margin-bottom: clamp(15px, 2.5vw, 30px);
}

@media (max-width: 768px) {
    .container {
        padding: 0 4px;
    }

    .calendar-wrapper {
        padding: 8px;
    }

    .month-block {
        padding: 2px;
        container-type: normal;
    }

    .month-title {
        margin-bottom: 3px;
        font-size: 0.7em;
    }

    .month-days {
        gap: 1px;
    }

    .day-header {
        font-size: 0.5em;
        line-height: 1;
        padding: 1px 0;
    }

    .day-cell {
        width: 100%;
        height: auto !important;
        aspect-ratio: 1 / 1 !important;
        font-size: 0.55em;
        line-height: 1 !important;
        padding: 0;
        min-height: unset !important;
        display: grid;
        place-items: center;
    }
}

.month-block {
    border: 1px solid #e0e0e0;
    border-radius: clamp(4px, 0.6vw, 8px);
    padding: clamp(8px, 1.2vw, 15px);
    background: white;
    min-width: 0;
    container-type: inline-size;
}

.month-title {
    font-size: clamp(0.9em, 1.8vw, 1.3em);
    font-weight: bold;
    margin-bottom: clamp(8px, 1.2vw, 15px);
    text-align: center;
    color: #005bb5;
    cursor: pointer;
    transition: color 0.3s;
}

.month-title:hover {
    color: #d32f2f;
    text-decoration: underline;
}

.month-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: clamp(2px, 0.4vw, 5px);
    width: 100%;
}

.day-header {
    text-align: center;
    font-weight: bold;
    font-size: clamp(0.6em, 1vw, 0.85em);
    color: #666;
    padding: clamp(2px, 0.4vw, 5px);
}

.day-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(0.65em, 1.1vw, 0.9em);
    border-radius: clamp(2px, 0.3vw, 3px);
    position: relative;
    min-width: 0;
    min-height: clamp(20px, 2.5vw, 30px);
}

.day-cell.working {
    background-color: #ffffff;
    color: #333;
    border: 1px solid #e0e0e0;
}

.day-cell.short-day {
    background-color: #81d4fa;
    color: #01579b;
}

.day-cell.weekend {
    background-color: #ff9800;
    color: #ffffff;
}

.day-cell.holiday {
    background-color: #d32f2f;
    color: #ffffff;
    font-weight: bold;
}

.day-cell.weekend {
    background-color: #ff9800;
    color: #ffffff;
}

.day-cell.holiday {
    background-color: #d32f2f;
    color: #ffffff;
    font-weight: bold;
}

.day-cell.empty {
    visibility: hidden;
}

.day-cell.today {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    font-weight: bold;
    border: clamp(1px, 0.15vw, 2px) solid #005bb5;
    box-shadow: 0 0 clamp(4px, 0.6vw, 8px) rgba(0, 91, 181, 0.5);
    position: relative;
}

.day-cell.today::after {
    content: '●';
    position: absolute;
    top: clamp(1px, 0.15vw, 2px);
    right: clamp(1px, 0.15vw, 2px);
    font-size: clamp(5px, 0.6vw, 8px);
    color: #ffc107;
}

.day-cell.with-birthday {
    padding: clamp(1px, 0.15vw, 2px) !important;
    min-height: clamp(25px, 3.3vw, 40px);
    position: relative !important;
    overflow: visible !important;
}

/* Color ribbon */
.color-ribbon {
    display: flex;
    height: clamp(4px, 0.6vw, 8px);
    margin: clamp(10px, 1.5vw, 20px) 0;
    border-radius: clamp(2px, 0.3vw, 4px);
    overflow: hidden;
}

.ribbon-segment {
    flex: 1;
}

.ribbon-red {
    background-color: #d32f2f;
}

.ribbon-blue {
    background-color: #1976d2;
}

.ribbon-green {
    background-color: #388e3c;
}

.ribbon-yellow {
    background-color: #f57c00;
}

/* Clock Ticker */
.clock-ticker-container {
    background-color: #000000 !important;
    margin: clamp(10px, 1.5vw, 20px) 0;
    overflow: hidden;
    width: 100%;
    position: relative;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
}

.clock-ticker {
    height: clamp(28px, 3.2vw, 38px);
    overflow: hidden;
    position: relative;
    width: 100%;
    display: block;
    line-height: clamp(28px, 3.2vw, 38px);
}

.clock-ticker-world {
    border-bottom: 1px solid #333;
}

.clock-ticker-russia {
    border-top: 1px solid #333;
}

.clock-ticker-content {
    display: inline-block !important;
    white-space: nowrap !important;
    animation: scroll-left 80s linear infinite !important;
    padding: 0 !important;
    margin: 0 !important;
    will-change: transform;
}

.clock-ticker-content-reverse {
    display: inline-block !important;
    white-space: nowrap !important;
    animation: scroll-right 80s linear infinite !important;
    padding: 0 !important;
    margin: 0 !important;
    will-change: transform;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes scroll-right {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

.clock-item {
    color: #ffffff !important;
    font-size: clamp(10px, 1.2vw, 14px);
    font-weight: 500;
    font-family: 'Courier New', 'Monaco', monospace !important;
    white-space: nowrap;
    display: inline-block;
    margin: 0 clamp(6px, 1vw, 12px);
    vertical-align: middle;
}

.clock-time {
    color: #ffffff !important;
    font-weight: bold;
    margin-left: clamp(3px, 0.5vw, 6px);
    font-family: 'Courier New', 'Monaco', monospace !important;
    letter-spacing: clamp(0.2px, 0.04vw, 0.5px);
}

.clock-separator {
    color: #666666 !important;
    font-size: clamp(10px, 1.2vw, 14px);
    margin: 0 clamp(4px, 0.6vw, 8px);
    vertical-align: middle;
}

/* Ads */
.ad-container {
    margin: clamp(15px, 2.5vw, 30px) 0;
    text-align: center;
    padding: clamp(10px, 1.5vw, 20px);
    background-color: #f5f5f5;
    border: clamp(1px, 0.15vw, 2px) dashed #ccc;
    border-radius: clamp(3px, 0.4vw, 5px);
    min-height: clamp(60px, 8vw, 100px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1em;
}

.ad-sticky {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #fff;
    z-index: 1000;
    border-top: clamp(1px, 0.15vw, 2px) solid #ccc;
    margin: 0;
    border-radius: 0;
    box-shadow: 0 clamp(-1px, -0.15vw, -2px) clamp(5px, 0.8vw, 10px) rgba(0,0,0,0.1);
}

/* Calculator */
.calculator-form {
    background: white;
    padding: clamp(15px, 2.5vw, 30px);
    border-radius: clamp(5px, 0.8vw, 10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: clamp(400px, 50vw, 600px);
    margin: 0 auto;
}

.form-group {
    margin-bottom: clamp(10px, 1.5vw, 20px);
}

.form-group label {
    display: block;
    margin-bottom: clamp(4px, 0.6vw, 8px);
    font-weight: bold;
    color: #333;
    font-size: 1em;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: clamp(6px, 0.8vw, 10px);
    border: 1px solid #ddd;
    border-radius: clamp(3px, 0.4vw, 5px);
    font-size: 1em;
}

.form-group select {
    background-color: white;
    cursor: pointer;
}

.result-box {
    margin-top: clamp(15px, 2.5vw, 30px);
    padding: clamp(10px, 1.5vw, 20px);
    background-color: #e3f2fd;
    border-radius: clamp(3px, 0.4vw, 5px);
}

.result-item {
    margin: clamp(5px, 0.8vw, 10px) 0;
    font-size: clamp(1em, 1.2vw, 1.1em);
}

/* Monthly page */
.month-detail {
    background: white;
    padding: clamp(15px, 2.5vw, 30px);
    border-radius: clamp(5px, 0.8vw, 10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: clamp(15px, 2.5vw, 30px);
}

.month-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(150px, 20vw, 200px), 1fr));
    gap: clamp(8px, 1.2vw, 15px);
    margin: clamp(10px, 1.5vw, 20px) 0;
}

.stat-card {
    background: #f5f5f5;
    padding: clamp(10px, 1.2vw, 15px);
    border-radius: clamp(3px, 0.4vw, 5px);
    text-align: center;
}

.stat-value {
    font-size: clamp(1.5em, 2.5vw, 2em);
    font-weight: bold;
    color: #005bb5;
}

.stat-label {
    color: #666;
    margin-top: clamp(3px, 0.4vw, 5px);
    font-size: 1em;
}

.weather-section {
    margin: clamp(15px, 2.5vw, 30px) 0;
    padding: clamp(10px, 1.5vw, 20px);
    background-color: #f9f9f9;
    border-radius: clamp(4px, 0.6vw, 8px);
}

.weather-title {
    font-size: clamp(1.2em, 2vw, 1.5em);
    margin-bottom: clamp(10px, 1.5vw, 20px);
    color: #005bb5;
}

.travel-tip {
    background-color: #fff3cd;
    padding: clamp(10px, 1.2vw, 15px);
    border-radius: clamp(3px, 0.4vw, 5px);
    margin-bottom: clamp(10px, 1.5vw, 20px);
    border-left: clamp(3px, 0.3vw, 4px) solid #ffc107;
}

.weather-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(150px, 20vw, 200px), 1fr));
    gap: clamp(8px, 1.2vw, 15px);
}

.weather-card {
    background: white;
    padding: clamp(10px, 1.2vw, 15px);
    border-radius: clamp(3px, 0.4vw, 5px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.weather-destination {
    font-weight: bold;
    margin-bottom: clamp(5px, 0.8vw, 10px);
    color: #005bb5;
    font-size: 1em;
}

.weather-temp {
    font-size: clamp(1em, 1.5vw, 1.2em);
    color: #333;
}

/* Immenikov */
.immenikov-section {
    background: white;
    padding: clamp(15px, 2.5vw, 30px);
    border-radius: clamp(5px, 0.8vw, 10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: clamp(15px, 2.5vw, 30px);
}

.login-options {
    display: flex;
    justify-content: center;
    gap: clamp(8px, 1.2vw, 15px);
    flex-wrap: wrap;
    margin: clamp(10px, 1.5vw, 20px) 0;
}

.login-btn {
    padding: clamp(8px, 1vw, 12px) clamp(16px, 2vw, 24px);
    border-radius: clamp(3px, 0.4vw, 5px);
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: all 0.3s;
    background-color: #e0e0e0;
    border-left: clamp(3px, 0.3vw, 4px) solid;
    display: inline-block;
    min-width: clamp(150px, 17vw, 200px);
    text-align: center;
    font-size: 1em;
}

.login-btn:hover {
    background-color: #d0d0d0;
    transform: translateY(clamp(-1px, -0.15vw, -2px));
    box-shadow: 0 clamp(1px, 0.15vw, 2px) clamp(3px, 0.4vw, 5px) rgba(0,0,0,0.1);
}

.login-yandex {
    border-left-color: #d32f2f; /* Russian flag red */
}

.login-vk {
    border-left-color: #0077ff; /* VK blue */
}

.login-mailru {
    border-left-color: #168de2; /* Mail.ru blue */
}

.login-ok {
    border-left-color: #ee8208; /* Odnoklassniki orange */
}

.birthday-form {
    margin: clamp(15px, 2.5vw, 30px) 0;
    padding: clamp(10px, 1.5vw, 20px);
    background-color: #f5f5f5;
    border-radius: clamp(3px, 0.4vw, 5px);
}

.birthday-input-group {
    display: flex;
    gap: clamp(5px, 0.8vw, 10px);
    margin-bottom: clamp(8px, 1.2vw, 15px);
    flex-wrap: wrap;
}

.birthday-input-group input {
    flex: 1;
    padding: clamp(6px, 0.8vw, 10px);
    border: 1px solid #ddd;
    border-radius: clamp(3px, 0.4vw, 5px);
    font-size: 1em;
    min-width: clamp(100px, 15vw, 150px);
}

.birthday-list {
    margin-top: clamp(15px, 2.5vw, 30px);
}

.birthday-card {
    background: white;
    padding: clamp(10px, 1.2vw, 15px);
    border-radius: clamp(3px, 0.4vw, 5px);
    margin-bottom: clamp(5px, 0.8vw, 10px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: clamp(5px, 0.8vw, 10px);
}

.birthday-info {
    flex: 1;
}

.birthday-name {
    font-weight: bold;
    font-size: clamp(1em, 1.3vw, 1.1em);
    color: #005bb5;
}

.birthday-date {
    color: #666;
    margin-top: clamp(3px, 0.4vw, 5px);
    font-size: 1em;
}

.birthday-days {
    color: #d32f2f;
    font-weight: bold;
    font-size: 1em;
}

.delete-btn {
    background-color: #d32f2f;
    color: white;
    border: none;
    padding: clamp(5px, 0.6vw, 8px) clamp(10px, 1.2vw, 15px);
    border-radius: clamp(3px, 0.4vw, 5px);
    cursor: pointer;
    font-size: clamp(0.85em, 1.1vw, 1em);
}

.delete-btn:hover {
    background-color: #b71c1c;
}

/* Footer */
footer {
    text-align: center;
    padding: clamp(10px, 1.5vw, 20px);
    margin-top: clamp(25px, 4vw, 50px);
    color: #666;
    font-size: clamp(0.8em, 1.1vw, 0.9em);
    line-height: 1.8;
}

footer a {
    color: #005bb5;
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: #004494;
    text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        padding-bottom: clamp(80px, 15vw, 120px);
    }
    
    .ad-sticky {
        display: flex;
    }
}

/* Mobile landscape mode - removed, responsive design handles all orientations */

/* PDF specific styles */
@media print {
    .ad-container,
    .nav-buttons,
    .btn,
    .clock-ticker-container {
        display: none;
    }
    
    .calendar-wrapper {
        box-shadow: none;
    }
}

