:root {
    --primary: 220 100% 50%; /* #0066FF */
    --primary-dark: 220 100% 40%; /* #0052CC */
    --secondary: 210 11% 71%; /* #B3B9C4 */
    --background: 210 11% 98%; /* #F8F9FA */
    --surface: 0 0% 100%; /* #FFFFFF */
    --text: 210 11% 15%; /* #1F2937 */
    --text-muted: 210 11% 45%; /* #6B7280 */
    --border: 210 11% 85%; /* #E5E7EB */
    --success: 120 60% 50%; /* #22C55E */
    --warning: 38 100% 50%; /* #FF8C00 */
    --error: 0 84% 60%; /* #EF4444 */
    --shadow: 210 11% 4%; /* #0F172A */
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: hsl(var(--background));
    color: hsl(var(--text));
    line-height: 1.6;
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
    position: relative;
}

.header-content {
    position: relative;
}

.language-switch {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 5px;
}

.lang-btn {
    background: hsl(var(--surface));
    border: 2px solid hsl(var(--border));
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: hsl(var(--text-muted));
}

.lang-btn.active {
    background: hsl(var(--primary));
    border-color: hsl(var(--primary));
    color: white;
}

.lang-btn:hover:not(.active) {
    border-color: hsl(var(--primary));
    color: hsl(var(--primary));
}

header h1 {
    font-size: 2.5rem;
    color: hsl(var(--primary));
    margin-bottom: 10px;
    font-weight: 700;
}

header p {
    color: hsl(var(--text-muted));
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

section {
    background: hsl(var(--surface));
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px hsla(var(--shadow) / 0.1);
    border: 1px solid hsl(var(--border));
}

section h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: hsl(var(--text));
    display: flex;
    align-items: center;
    gap: 10px;
}

section h2 i {
    color: hsl(var(--primary));
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: hsl(var(--text));
}

.form-group select,
.form-group input {
    padding: 12px 15px;
    border: 2px solid hsl(var(--border));
    border-radius: 8px;
    font-size: 16px;
    background: hsl(var(--surface));
    color: hsl(var(--text));
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsla(var(--primary) / 0.1);
}

.form-group select:disabled,
.form-group input:disabled {
    background: hsl(var(--background));
    color: hsl(var(--text-muted));
    cursor: not-allowed;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    justify-content: center;
}

.btn-primary {
    background: hsl(var(--primary));
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: hsl(var(--primary-dark));
    transform: translateY(-2px);
    box-shadow: 0 4px 15px hsla(var(--primary) / 0.3);
}

.btn-secondary {
    background: hsl(var(--secondary));
    color: hsl(var(--text));
}

.btn-secondary:hover:not(:disabled) {
    background: hsl(var(--text-muted));
    color: white;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.hidden {
    display: none !important;
}

.loading {
    text-align: center;
    padding: 40px;
    color: hsl(var(--primary));
    font-size: 1.1rem;
}

.loading i {
    font-size: 1.5rem;
    margin-right: 10px;
}

.error {
    background: hsl(var(--error) / 0.1);
    border: 1px solid hsl(var(--error) / 0.3);
    color: hsl(var(--error));
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
}

.error i {
    margin-right: 10px;
}

.holiday-summary {
    background: hsl(var(--primary) / 0.1);
    border: 1px solid hsl(var(--primary) / 0.3);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: hsl(var(--primary-dark));
    text-align: center;
    font-weight: 600;
}

.holiday-list {
    display: grid;
    gap: 10px;
}

.holiday-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 15px;
    padding: 15px;
    background: hsl(var(--background));
    border-radius: 8px;
    border: 1px solid hsl(var(--border));
    align-items: center;
}

.holiday-name {
    font-weight: 600;
    color: hsl(var(--text));
}

.holiday-date {
    color: hsl(var(--text-muted));
}

.holiday-day {
    color: hsl(var(--primary));
    font-weight: 500;
}

.strategy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.strategy-card {
    background: hsl(var(--background));
    border: 2px solid hsl(var(--border));
    border-radius: 12px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.strategy-card:hover {
    border-color: hsl(var(--primary));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px hsla(var(--primary) / 0.15);
}

.strategy-card.selected {
    border-color: hsl(var(--primary));
    background: hsl(var(--primary) / 0.05);
}

.strategy-card h3 {
    color: hsl(var(--primary));
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.strategy-card p {
    color: hsl(var(--text-muted));
    font-size: 0.95rem;
}

.vacation-counter {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.counter-item {
    background: hsl(var(--background));
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid hsl(var(--border));
}

.counter-label {
    display: block;
    color: hsl(var(--text-muted));
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.counter-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: hsl(var(--primary));
}

.results-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid hsl(var(--border));
}

.tab-btn {
    background: none;
    border: none;
    padding: 15px 25px;
    cursor: pointer;
    color: hsl(var(--text-muted));
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: hsl(var(--primary));
    border-bottom-color: hsl(var(--primary));
}

.tab-btn:hover {
    color: hsl(var(--primary));
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.vacation-suggestions {
    display: grid;
    gap: 20px;
}

.vacation-block {
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: 8px;
    padding: 20px;
    position: relative;
}

.vacation-block.selectable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.vacation-block.selectable:hover {
    border-color: hsl(var(--primary));
    box-shadow: 0 2px 10px hsla(var(--primary) / 0.1);
}

.vacation-block.selected {
    border-color: hsl(var(--success));
    background: hsl(var(--success) / 0.05);
}

.vacation-block.deselected {
    opacity: 0.6;
    background: hsl(var(--text-muted) / 0.05);
}

.vacation-block h4 {
    color: hsl(var(--primary));
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.vacation-days {
    margin: 15px 0;
}

.vacation-day {
    display: inline-block;
    background: hsl(var(--primary) / 0.1);
    color: hsl(var(--primary));
    padding: 5px 10px;
    border-radius: 4px;
    margin: 2px;
    font-size: 0.9rem;
    font-weight: 500;
}

.vacation-summary {
    color: hsl(var(--text-muted));
    font-style: italic;
    margin-top: 10px;
}

.calendar-container {
    display: grid;
    gap: 30px;
}

.calendar-month {
    background: hsl(var(--background));
    border-radius: 8px;
    padding: 20px;
    border: 1px solid hsl(var(--border));
}

.calendar-header {
    text-align: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: hsl(var(--primary));
    margin-bottom: 15px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    padding: 8px;
    font-size: 0.8rem;
    color: hsl(var(--text-muted));
    background: hsl(var(--background));
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    border-radius: 4px;
    position: relative;
    cursor: default;
}

.calendar-day.other-month {
    color: hsl(var(--text-muted) / 0.5);
}

.calendar-day.today {
    background: hsl(var(--primary) / 0.2);
    font-weight: 700;
    color: hsl(var(--primary));
}

.calendar-day.holiday {
    background: hsl(var(--warning) / 0.3);
    color: hsl(var(--warning));
    font-weight: 600;
}

.calendar-day.vacation {
    background: hsl(var(--success) / 0.3);
    color: hsl(var(--success));
    font-weight: 600;
}

.calendar-day.weekend {
    background: hsl(var(--text-muted) / 0.1);
}

.calendar-day.vacation.selectable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.calendar-day.vacation.selectable:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px hsla(var(--success) / 0.3);
}

.calendar-day.deselected {
    opacity: 0.5;
    background: hsl(var(--text-muted) / 0.1) !important;
    color: hsl(var(--text-muted)) !important;
}

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    justify-content: center;
    padding: 15px;
    background: hsl(var(--background));
    border-radius: 8px;
    border: 1px solid hsl(var(--border));
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: hsl(var(--text));
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid hsl(var(--border));
}

.legend-color.today {
    background: hsl(var(--primary) / 0.2);
}

.legend-color.holiday {
    background: hsl(var(--warning) / 0.3);
}

.legend-color.vacation {
    background: hsl(var(--success) / 0.3);
}

.legend-color.weekend {
    background: hsl(var(--text-muted) / 0.1);
}

.actions {
    text-align: center;
    margin-top: 30px;
}

footer {
    text-align: center;
    padding: 30px 0;
    color: hsl(var(--text-muted));
    border-top: 1px solid hsl(var(--border));
    margin-top: 40px;
}

footer a {
    color: hsl(var(--primary));
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    section {
        padding: 20px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .strategy-grid {
        grid-template-columns: 1fr;
    }
    
    .vacation-counter {
        grid-template-columns: 1fr;
    }
    
    .holiday-item {
        grid-template-columns: 1fr;
        gap: 5px;
        text-align: center;
    }
    
    .results-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        border-bottom: none;
        border-right: 3px solid transparent;
    }
    
    .tab-btn.active {
        border-right-color: hsl(var(--primary));
        border-bottom-color: transparent;
    }
}

@media (max-width: 480px) {
    .calendar-grid {
        font-size: 0.8rem;
    }
    
    .calendar-day {
        font-size: 0.7rem;
    }
    
    .vacation-day {
        font-size: 0.8rem;
        padding: 3px 6px;
    }
}

/* AdSense Styling */
.ad-container {
    margin: 40px 0;
    text-align: center;
    padding: 20px;
    background: hsl(var(--muted));
    border-radius: 10px;
    border: 1px dashed hsl(var(--border));
}

.ad-container::before {
    content: "Advertisement";
    display: block;
    font-size: 12px;
    color: hsl(var(--text-muted));
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
