/* Enhanced CSS for Modern Design */

/* Additional Styles for Enhanced Design */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.floating-elements {
    position: relative;
    width: 100%;
    height: 100%;
}

.floating-element {
    position: absolute;
    font-size: clamp(20px, 3vw, 40px);
    opacity: 0.1;
    animation: float 20s ease-in-out infinite;
}

.floating-element:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.floating-element:nth-child(2) { left: 80%; top: 30%; animation-delay: 3s; }
.floating-element:nth-child(3) { left: 20%; top: 70%; animation-delay: 6s; }
.floating-element:nth-child(4) { left: 70%; top: 80%; animation-delay: 9s; }
.floating-element:nth-child(5) { left: 50%; top: 10%; animation-delay: 12s; }
.floating-element:nth-child(6) { left: 30%; top: 50%; animation-delay: 15s; }

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(90deg); }
    50% { transform: translateY(-40px) rotate(180deg); }
    75% { transform: translateY(-20px) rotate(270deg); }
}

.year-badge {
    display: inline-block;
    background: linear-gradient(45deg, var(--primary-color), var(--primary-dark));
    color: #000;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.6em;
    font-weight: 700;
    margin-left: 0.5rem;
    animation: pulse 2s ease-in-out infinite;
}

.light-mode .year-badge {
    background: linear-gradient(45deg, var(--secondary-color), var(--secondary-dark));
    color: #fff;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.highlight {
    background: linear-gradient(45deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.light-mode .highlight {
    background: linear-gradient(45deg, var(--secondary-color), var(--secondary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.trust-indicators {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 12px;
    transition: var(--transition);
    min-width: 120px;
}

.light-mode .trust-item {
    background: rgba(0, 123, 255, 0.1);
    border: 1px solid rgba(0, 123, 255, 0.2);
}

.trust-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 255, 136, 0.2);
}

.light-mode .trust-item:hover {
    box-shadow: 0 10px 25px rgba(0, 123, 255, 0.2);
}

.trust-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.light-mode .trust-item i {
    color: var(--secondary-color);
}

.trust-item span {
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

.profile-section {
    text-align: center;
    margin-bottom: 2rem;
}

.profile-image {
    position: relative;
    display: inline-block;
}

.profile-gif {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
    object-fit: cover;
}

.light-mode .profile-gif {
    border-color: var(--secondary-color);
}

.profile-gif:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 25px rgba(0, 255, 136, 0.3);
}

.light-mode .profile-gif:hover {
    box-shadow: 0 10px 25px rgba(0, 123, 255, 0.3);
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary-dark);
    margin-bottom: 0.5rem;
}

.light-mode .form-title {
    color: var(--text-primary-light);
}

.form-subtitle {
    color: var(--text-secondary-dark);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.light-mode .form-subtitle {
    color: var(--text-secondary-light);
}

.telegram-cta {
    margin: 1.5rem 0;
}

.telegram-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, #0088cc, #229ED9);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    transition: var(--transition);
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0, 136, 204, 0.3);
}

.telegram-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 136, 204, 0.4);
    color: white;
    text-decoration: none;
}

.telegram-btn i {
    font-size: 1.5rem;
}

.telegram-btn small {
    font-size: 0.8rem;
    opacity: 0.9;
}

.stats-section {
    display: flex;
    justify-content: space-around;
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.1);
    border-radius: 12px;
}

.light-mode .stats-section {
    background: rgba(0, 123, 255, 0.05);
    border: 1px solid rgba(0, 123, 255, 0.1);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    font-family: 'JetBrains Mono', monospace;
}

.light-mode .stat-number {
    color: var(--secondary-color);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary-dark);
    font-weight: 500;
}

.light-mode .stat-label {
    color: var(--text-secondary-light);
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.alert-error {
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid rgba(255, 71, 87, 0.3);
    color: var(--error-color);
}

.alert-warning {
    background: rgba(255, 165, 2, 0.1);
    border: 1px solid rgba(255, 165, 2, 0.3);
    color: var(--warning-color);
}

.ad-notice {
    background: rgba(255, 165, 2, 0.1);
    border: 1px solid rgba(255, 165, 2, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--warning-color);
}

.ad-section {
    margin: 1.5rem 0;
    text-align: center;
}

.ad-frame {
    max-height: 100px;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.light-mode .ad-frame {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary-dark);
}

.light-mode .form-label {
    color: var(--text-primary-light);
}

.input-wrapper {
    position: relative;
}

.form-control {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 2px solid rgba(0, 255, 136, 0.3) !important;
    border-radius: 8px !important;
    color: var(--primary-color) !important;
    font-size: 1rem;
    transition: var(--transition);
}

.light-mode .form-control {
    background: rgba(0, 0, 0, 0.05) !important;
    border: 2px solid rgba(0, 123, 255, 0.3) !important;
    color: var(--secondary-color) !important;
}

.form-control:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1) !important;
    outline: none;
}

.light-mode .form-control:focus {
    border-color: var(--secondary-color) !important;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1) !important;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    opacity: 0.7;
}

.light-mode .input-icon {
    color: var(--secondary-color);
}

.form-help {
    color: var(--text-secondary-dark);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.light-mode .form-help {
    color: var(--text-secondary-light);
}

.fallback-section {
    position: relative;
    margin: 1.5rem 0;
}

.fallback-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(45deg, var(--warning-color), #cc7700);
    color: #000;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.fallback-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 165, 2, 0.3);
}

.fallback-btn.clicked {
    transform: scale(0.98);
}

.ad-behind-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    overflow: hidden;
    border-radius: 8px;
}

.captcha-section {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
}

.h-captcha {
    max-width: 100%;
    margin: 0 auto;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(45deg, #666, #999);
    color: #ccc;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: not-allowed;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    margin: 1.5rem 0;
}

.submit-btn.enabled {
    background: linear-gradient(45deg, var(--primary-color), var(--primary-dark));
    color: #000;
    cursor: pointer;
}

.light-mode .submit-btn.enabled {
    background: linear-gradient(45deg, var(--secondary-color), var(--secondary-dark));
    color: #fff;
}

.submit-btn.enabled:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 255, 136, 0.3);
}

.light-mode .submit-btn.enabled:hover {
    box-shadow: 0 10px 25px rgba(0, 123, 255, 0.3);
}

.submit-btn.loading .btn-text {
    opacity: 0;
}

.submit-btn.loading .btn-loader {
    opacity: 1;
}

.btn-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: var(--transition);
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.terms-notice {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.light-mode .terms-notice {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.terms-notice a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.light-mode .terms-notice a {
    color: var(--secondary-color);
}

.terms-notice a:hover {
    text-decoration: underline;
    color: var(--primary-dark);
}

.light-mode .terms-notice a:hover {
    color: var(--secondary-dark);
}

.online-counter {
    text-align: center;
    margin: 2rem 0;
}

.features-section {
    margin: 3rem 0;
    text-align: center;
}

.features-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-primary-dark);
}

.light-mode .features-title {
    color: var(--text-primary-light);
}

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

.feature-item {
    padding: 2rem;
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.1);
    border-radius: 12px;
    transition: var(--transition);
}

.light-mode .feature-item {
    background: rgba(0, 123, 255, 0.05);
    border: 1px solid rgba(0, 123, 255, 0.1);
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 255, 136, 0.2);
}

.light-mode .feature-item:hover {
    box-shadow: 0 10px 25px rgba(0, 123, 255, 0.2);
}

.feature-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.light-mode .feature-item i {
    color: var(--secondary-color);
}

.feature-item h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary-dark);
}

.light-mode .feature-item h4 {
    color: var(--text-primary-light);
}

.feature-item p {
    color: var(--text-secondary-dark);
    line-height: 1.6;
}

.light-mode .feature-item p {
    color: var(--text-secondary-light);
}

.footer-section {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.light-mode .footer-section {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.footer-brand a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 700;
}

.light-mode .footer-brand a {
    color: var(--secondary-color);
}

.footer-nav {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-nav a {
    color: var(--text-secondary-dark);
    text-decoration: none;
    transition: var(--transition);
}

.light-mode .footer-nav a {
    color: var(--text-secondary-light);
}

.footer-nav a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.light-mode .footer-nav a:hover {
    color: var(--secondary-color);
}

.footer-copyright {
    color: var(--text-secondary-dark);
    font-size: 0.9rem;
}

.light-mode .footer-copyright {
    color: var(--text-secondary-light);
}

.noscript-warning {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    text-align: center;
    padding: 2rem;
}

.noscript-warning h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--error-color);
}

/* Responsive Design Enhancements */
@media (max-width: 768px) {
    .trust-indicators {
        gap: 1rem;
    }
    
    .trust-item {
        min-width: 100px;
        padding: 0.8rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-nav {
        gap: 1rem;
    }
    
    .stats-section {
        flex-direction: column;
        gap: 1rem;
    }
    
    .telegram-btn {
        padding: 0.8rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .login-card {
        padding: 1.5rem;
    }
    
    .trust-indicators {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .trust-item {
        flex-direction: row;
        justify-content: center;
        min-width: auto;
        width: 100%;
    }
    
    .footer-nav {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Print Styles */
@media print {
    .theme-toggle,
    .ad-section,
    .ad-frame,
    .background-animation,
    .floating-elements {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .login-card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #00ff00;
        --secondary-color: #0000ff;
        --background-dark: #000000;
        --background-light: #ffffff;
        --text-primary-dark: #ffffff;
        --text-primary-light: #000000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-element {
        animation: none;
    }
    
    .gradientShift {
        animation: none;
    }
}