/* CSS Variables */
:root {
    --primary: #0056b3;
    --primary-light: #4a90e2;
    --primary-dark: #003d82;
    --secondary: #17a2b8;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    
    --background: #f8fcff;
    --surface: #ffffff;
    --text: #1e3a5f;
    --text-light: #5e7ea7;
    --text-muted: #8fa8c7;
    --border: rgba(9, 30, 66, 0.08);
    --shadow: rgba(9, 30, 66, 0.15);
    --shadow-light: rgba(9, 30, 66, 0.08);
    
    --gradient-primary: linear-gradient(135deg, #0056b3 0%, #4a90e2 100%);
    --gradient-water: linear-gradient(135deg, #00c6fb 0%, #005bea 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.1) 100%);
    
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-lg: 24px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Variables */
body.dark-mode {
    --background: #0b1426;
    --surface: #1a2332;
    --text: #e1e8f0;
    --text-light: #a7b9d0;
    --text-muted: #6b7c93;
    --border: rgba(255, 255, 255, 0.12);
    --shadow: rgba(0, 0, 0, 0.4);
    --shadow-light: rgba(0, 0, 0, 0.2);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--background);
    transition: var(--transition);
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text);
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin: 2rem 0 1rem;
    position: relative;
}

h2::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
}

a:hover {
    color: var(--primary-dark);
}

a::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

a:hover::before {
    width: 100%;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 20px;
    min-height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.logo-image {
    height: 40px;
    width: auto;
    margin-right: 12px;
}

.main-nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.1;
    transition: left 0.3s ease;
    z-index: -1;
}

.nav-link:hover::before {
    left: 0;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text);
    margin: 3px 0;
    border-radius: 2px;
    transition: var(--transition);
}

.menu-toggle:hover {
    background: var(--border);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--surface);
        box-shadow: 0 8px 32px var(--shadow);
        border-radius: 0 0 var(--border-radius) var(--border-radius);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }
    
    .main-nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-links {
        flex-direction: column;
        padding: 1rem;
        gap: 0;
    }
    
    .nav-link {
        display: block;
        padding: 1rem;
        border-radius: var(--border-radius-sm);
        margin-bottom: 0.5rem;
    }
}

/* Water Background Animation */
.water-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: var(--gradient-water);
    opacity: 0.03;
}

.water-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M985.66,92.83C906.67,72,823.78,31,743.84,14.19c-82.26-17.34-168.06-16.33-250.45.39-57.84,11.73-114,31.07-172,41.86A600.21,600.21,0,0,1,0,27.35V120H1200V95.8C1132.19,118.92,1055.71,111.31,985.66,92.83Z' fill='%23ffffff' fill-opacity='0.1'/%3E%3C/svg%3E") repeat-x;
    animation: wave 15s ease-in-out infinite;
}

.water-wave:nth-child(2) {
    animation: wave 20s ease-in-out infinite reverse;
    opacity: 0.5;
    height: 80px;
}

.water-wave:nth-child(3) {
    animation: wave 25s ease-in-out infinite;
    opacity: 0.3;
    height: 60px;
}

@keyframes wave {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-50%); }
}

/* Main Content */
.content {
    margin-top: 90px;
    padding: 2rem 0;
    position: relative;
    z-index: 1;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px var(--shadow-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 1000;
}

.dark-mode-toggle:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 8px 30px var(--shadow);
}

.dark-mode-toggle svg {
    width: 24px;
    height: 24px;
    fill: var(--text);
    transition: var(--transition);
}

/* Cards */
.card {
    background: var(--surface);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px var(--shadow-light);
    margin: 2rem 0;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px var(--shadow);
}

.card-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-header svg {
    opacity: 0.9;
}

.card-body {
    padding: 2rem;
}

/* Glass Panel */
.glass-panel {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    transition: var(--transition);
}

.glass-panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.5);
}

/* Water Level Indicators */
.water-level-indicator {
    width: 100%;
    height: 60px;
    background: linear-gradient(to right, #e3f2fd, #bbdefb);
    border-radius: var(--border-radius-sm);
    position: relative;
    overflow: hidden;
    margin: 1rem 0;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
}

.water-level-wave {
    position: absolute;
    top: 20%;
    left: 0;
    width: 200%;
    height: 100%;
    background: var(--gradient-water);
    border-radius: 50% 50% 0 0;
    animation: waterLevel 3s ease-in-out infinite;
}

@keyframes waterLevel {
    0%, 100% {
        transform: translateX(0) rotate(0deg);
    }
    25% {
        transform: translateX(-25%) rotate(1deg);
    }
    50% {
        transform: translateX(-50%) rotate(0deg);
    }
    75% {
        transform: translateX(-25%) rotate(-1deg);
    }
}

/* Schedule Items */
.schedule-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--border-radius-sm);
    border-left: 4px solid var(--primary);
    transition: var(--transition);
}

.schedule-item:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateX(8px);
}

.schedule-time {
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    min-width: 80px;
    text-align: center;
    margin-right: 1rem;
    box-shadow: 0 2px 8px rgba(0, 86, 179, 0.3);
}

/* Telegram Info */
.telegram-info {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #0088cc, #005599);
    color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    margin: 2rem 0;
    box-shadow: 0 8px 32px rgba(0, 136, 204, 0.3);
    transition: var(--transition);
}

.telegram-info:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 136, 204, 0.4);
}

.telegram-icon {
    flex-shrink: 0;
    margin-right: 1.5rem;
}

.telegram-icon svg {
    width: 60px;
    height: 60px;
    fill: white;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.telegram-text h3 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.telegram-text p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .telegram-info {
        flex-direction: column;
        text-align: center;
    }
    
    .telegram-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.75rem 1.5rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 86, 179, 0.3);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 86, 179, 0.4);
}

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: translateY(0);
}

/* Alert */
.alert {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 1px solid #ffeaa7;
    border-left: 4px solid var(--warning);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: 0 4px 16px rgba(255, 193, 7, 0.2);
}

.alert-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #856404;
    margin-bottom: 0.5rem;
}

.alert-title svg {
    fill: #856404;
}

.alert p {
    color: #856404;
    margin: 0;
}

/* Lists */
ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

ul li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
    position: relative;
}

ul li::marker {
    color: var(--primary);
}

ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

ol li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

/* Footer */
.footer {
    background: var(--gradient-primary);
    color: white;
    margin-top: 4rem;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 3rem 20px 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
    text-decoration: none;
    margin-bottom: 1rem;
}

.footer-logo i {
    margin-right: 12px;
    font-size: 1.5rem;
}

.footer-about p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: var(--transition);
}

.social-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.footer-links h3,
.footer-contact h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links ul li {
    margin-bottom: 0.5rem;
}

.footer-links ul li a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: white;
    padding-left: 8px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.contact-item i {
    width: 20px;
    margin-right: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-sm {
    font-size: 0.9rem;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.highlight {
    background: linear-gradient(120deg, rgba(74, 144, 226, 0.3) 0%, rgba(74, 144, 226, 0.3) 100%);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

/* Water Drops Animation */
.water-drop {
    position: absolute;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, rgba(74, 144, 226, 0.6), rgba(0, 86, 179, 0.8));
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    animation: waterDrop 2s ease-out forwards;
    pointer-events: none;
    z-index: -1;
}

@keyframes waterDrop {
    0% {
        opacity: 0;
        transform: rotate(-45deg) scale(0);
    }
    20% {
        opacity: 1;
        transform: rotate(-45deg) scale(1);
    }
    80% {
        opacity: 1;
        transform: rotate(-45deg) scale(1);
    }
    100% {
        opacity: 0;
        transform: rotate(-45deg) scale(0);
    }
}

/* Ripple Effect */
.ripple-effect {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(74, 144, 226, 0.3);
    transform: translate(-50%, -50%);
    animation: ripple 0.8s ease-out forwards;
    pointer-events: none;
    z-index: 9999;
}

@keyframes ripple {
    0% {
        width: 20px;
        height: 20px;
        opacity: 0.8;
    }
    100% {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }
    
    .content {
        padding: 1.5rem 0;
    }
}

@media (max-width: 768px) {
    .dark-mode-toggle {
        right: 16px;
        width: 45px;
        height: 45px;
    }
    
    .schedule-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .schedule-time {
        margin-right: 0;
    }
    
    .card-header {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .glass-panel {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .content {
        padding: 1rem 0;
    }
    
    .telegram-icon svg {
        width: 50px;
        height: 50px;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Performance Optimizations */
.water-wave,
.water-level-wave,
.water-drop {
    will-change: transform;
}

/* Print Styles */
@media print {
    .header,
    .dark-mode-toggle,
    .water-background,
    .telegram-info,
    .footer {
        display: none;
    }
    
    .content {
        margin-top: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}