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

#bgCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

:root[data-theme="light"] {
    --bg-color: #ffffff;
    --text-color: #000000;
    --accent-color: #3390ec;
    --accent-hover: #2481cc;
    --border-color: #e5e5e5;
    --card-bg: #f8f9fa;
    --text-secondary: #707579;
}

:root[data-theme="dark"] {
    --bg-color: #0f0f0f;
    --text-color: #ffffff;
    --accent-color: #3390ec;
    --accent-hover: #4da3ff;
    --border-color: #2a2a2a;
    --card-bg: #1a1a1a;
    --text-secondary: #b0b0b0;
}

body {
    font-family: 'Monster Sans', 'monstersans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s, color 0.3s;
}

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

/* Header */
.header {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    transition: background-color 0.3s, border-color 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

:root[data-theme="light"] .header {
    background-color: rgba(255, 255, 255, 0.95);
}

:root[data-theme="dark"] .header {
    background-color: rgba(15, 15, 15, 0.95);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.nav-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    height: 32px;
    width: auto;
    transition: opacity 0.3s;
}

:root[data-theme="light"] .logo-light {
    display: block !important;
}

:root[data-theme="light"] .logo-dark {
    display: none !important;
}

:root[data-theme="dark"] .logo-light {
    display: none !important;
}

:root[data-theme="dark"] .logo-dark {
    display: block !important;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 101;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s;
}

.nav-menu a:hover {
    color: var(--accent-color);
}

/* Language Selector */
.language-selector {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    color: var(--text-color);
    transition: all 0.2s;
}

.lang-btn:hover {
    background-color: var(--card-bg);
    border-color: var(--accent-color);
}

.lang-flag {
    display: flex;
    align-items: center;
    width: 20px;
    height: 15px;
}

.lang-flag svg {
    width: 100%;
    height: 100%;
    display: block;
}

.lang-code {
    font-weight: 500;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 1000;
}

.language-selector.active .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-note {
    padding: 10px 15px;
    font-size: 12px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.lang-option:hover {
    background-color: var(--card-bg);
}

.lang-option.active {
    background-color: var(--card-bg);
    color: var(--accent-color);
}

.lang-option .lang-flag {
    width: 24px;
    height: 18px;
    flex-shrink: 0;
}

.lang-name {
    font-weight: 500;
}

/* Main */
.main {
    flex: 1;
    position: relative;
    z-index: 1;
}

/* Hero Section */
.hero {
    padding: 100px 0;
    text-align: center;
    background: var(--bg-color);
    transition: background-color 0.3s;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 72px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -2px;
    background: linear-gradient(135deg, var(--text-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

:root[data-theme="dark"] .hero-title {
    background: linear-gradient(135deg, #ffffff 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 24px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

@media (max-width: 768px) {
    .btn:hover::before {
        width: 200px;
        height: 200px;
    }
}

.btn span {
    position: relative;
    z-index: 1;
}

.btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

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

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

.btn-secondary:hover {
    background-color: var(--accent-color);
    color: white;
}

/* Features Section */
.features {
    padding: 80px 0;
    background-color: transparent;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    padding: 30px;
    background-color: var(--card-bg);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

:root[data-theme="dark"] .feature-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(51, 144, 236, 0.15), transparent);
    transition: left 0.5s;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(51, 144, 236, 0.25);
    border-color: var(--accent-color);
    background-color: var(--card-bg);
}

:root[data-theme="dark"] .feature-card:hover {
    box-shadow: 0 20px 50px rgba(51, 144, 236, 0.35);
}

@media (max-width: 768px) {
    .feature-card:hover {
        transform: translateY(-4px) scale(1.01);
    }
}

.feature-card:active {
    transform: translateY(-4px) scale(1.01);
}

.feature-card h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-color);
}

.feature-card p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Footer */
.footer {
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    position: relative;
    z-index: 1;
    transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}

/* Mobile Adaptation */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .nav-top {
        padding: 0;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        gap: 0;
        width: 100%;
        padding: 20px 0 10px 0;
        border-top: 1px solid var(--border-color);
        margin-top: 15px;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        padding: 12px 0;
        font-size: 16px;
        border-bottom: 1px solid rgba(229, 229, 229, 0.5);
    }

    .nav-menu li:last-child a {
        border-bottom: none;
    }

    .language-selector {
        width: 100%;
        margin-top: 10px;
    }

    .lang-btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }

    .lang-dropdown {
        position: fixed;
        top: auto;
        right: 15px;
        left: 15px;
        width: auto;
        min-width: auto;
    }

    .hero {
        padding: 40px 0 50px 0;
    }

    .hero-title {
        font-size: 42px;
        margin-bottom: 15px;
        line-height: 1.1;
    }

    .hero-subtitle {
        font-size: 18px;
        margin-bottom: 30px;
        line-height: 1.4;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .btn {
        width: 100%;
        max-width: 100%;
        padding: 14px 24px;
        font-size: 16px;
    }

    .features {
        padding: 40px 0;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 30px;
    }

    .feature-card {
        padding: 20px;
    }

    .feature-card h3 {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .feature-card p {
        font-size: 15px;
        line-height: 1.5;
    }

    .container {
        padding: 0 16px;
    }

    .footer {
        padding: 25px 0;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0;
    }

    .nav {
        padding: 12px 0;
    }

    .logo {
        height: 26px;
    }

    .hero {
        padding: 30px 0 40px 0;
    }

    .hero-title {
        font-size: 32px;
        letter-spacing: -0.5px;
    }

    .hero-subtitle {
        font-size: 16px;
        margin-bottom: 25px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 15px;
    }

    .features {
        padding: 30px 0;
    }

    .features-grid {
        gap: 14px;
    }

    .feature-card {
        padding: 18px;
    }

    .feature-card h3 {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .feature-card p {
        font-size: 14px;
    }

    .container {
        padding: 0 12px;
    }

    .lang-dropdown {
        right: 12px;
        left: 12px;
    }

    .lang-note {
        font-size: 11px;
        padding: 8px 12px;
    }

    .lang-option {
        padding: 10px 12px;
    }
}

@media (max-width: 360px) {
    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 15px;
    }

    .feature-card {
        padding: 16px;
    }
}

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.theme-toggle:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    transform: scale(1.05);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 768px) {
    .theme-toggle {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }
}

/* Система уведомлений - оверлеи сверху */
.notification-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    align-items: center;
    width: 100%;
    max-width: 500px;
    padding: 0 20px;
}

.notification {
    min-width: 300px;
    max-width: 500px;
    width: 100%;
    padding: 18px 24px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    color: #ffffff;
    pointer-events: auto;
    cursor: pointer;
    text-align: center;
    transform: translateY(-120px) scale(0.8);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.4s;
    animation: notificationSlideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes notificationSlideIn {
    from {
        transform: translateY(-120px) scale(0.8);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes notificationSlideOut {
    from {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateY(-120px) scale(0.8);
        opacity: 0;
    }
}

.notification.show {
    animation: notificationSlideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.notification.hide {
    animation: notificationSlideOut 0.3s ease-in forwards;
}

.notification-error {
    background: linear-gradient(135deg, #ff4757 0%, #ee5a6f 100%) !important;
    border: 2px solid #ff1744 !important;
    color: #ffffff !important;
    box-shadow: 0 8px 32px rgba(255, 71, 87, 0.4) !important;
}

.notification-success {
    background: linear-gradient(135deg, #2ed573 0%, #1e90ff 100%) !important;
    border: 2px solid #00c851 !important;
    color: #ffffff !important;
    box-shadow: 0 8px 32px rgba(46, 213, 115, 0.4) !important;
}

.notification:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
    .notification-container {
        top: 10px;
        left: 10px;
        right: 10px;
        transform: none;
        max-width: 100%;
        padding: 0;
    }
    
    .notification {
        min-width: auto;
        max-width: 100%;
        width: 100%;
    }
}

