:root {
    --main-bg: #f8f9fa;
    --main-text: #333;
    --content-bg: #ffffff;
    --content-border: #0088cc;
    --content-shadow: rgba(0, 170, 255, 0.15);
    --title-color: #0088cc;
    --description-color: #666;
    --icon-bg: #D7E4FE;
    --footer-bg: #F4F6FA;
    --footer-text: #666;
    --loader_main-bg:rgba(255, 255, 255, 1);
    --loader--bg:rgba(255, 255, 255, 1);
    --loader-spinner-border:rgba(255, 255, 255, 1);
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.267);
}

.dark {
    --main-bg: #1a1a1a;
    --main-text: #e0e0e0;
    --content-bg: #2a2a2a;
    --content-border: #444444;
    --content-shadow: rgba(0, 0, 0, 0.3);
    --title-color: #ffffff;
    --description-color: #bbbbbb;
    --footer-bg: #333333;
    --footer-text: #aaaaaa;
    --loader_main-bg:rgb(0, 0, 0);
    --loader--bg:rgb(0, 0, 0);
    --loader-spinner-border:rgb(0, 0, 0);
    --card-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--main-bg);
    color: var(--main-text);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
    align-items: center;
}

main {
    padding: 40px 20px;
    min-height: calc(100vh - 80px);
    display: flex;
    justify-content: center;
    align-items: center;
    
}

.auth_container {
    max-width: 800px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.auth_section {
    background: var(--content-bg);
    width: 60%;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 2px 8px var(--content-shadow);
    transition: background-caolor 0.3s, border-color 0.3s, box-shadow 0.3s;
    box-shadow: var(--card-shadow)
}


.auth_icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--icon-bg);
    box-shadow: 0 3px 10px rgba(0, 170, 255, 0.2);
}

.auth_icon .icon {
    width: 50px;
    height: 50px;
}

.icon-light {
    display: block;
}

.auth_title {
    font-size: 24px;
    font-weight: 600;
    color: var(--title-color);
    margin-bottom: 15px;
    transition: color 0.3s;
}

.auth_description {
    font-size: 16px;
    color: var(--description-color);
    margin-bottom: 30px;
    line-height: 1.5;
    transition: color 0.3s;
}

.auth_actions {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

#telegram_login_container {
    width: 100%;
    display: flex;
    justify-content: center;
}

.auth_footer {
    background-color: var(--footer-bg);
    border-radius: 6px;
    padding: 15px;
    transition: background-color 0.3s;
}

.agreement_text {
    font-size: 14px;
    color: var(--footer-text);
    margin: 0;
    transition: color 0.3s;
}


header, main {
    display: none;
}

@media screen and (max-width: 768px) {
    main {
        padding: 15px;
        min-height: calc(100vh - 60px);
    }
    .body{
        padding-top: 60px;
    }
    .auth_container {
        margin-top: 0;
    }
    
    .auth_section {
        width: 90%;
        padding: 35px 25px;
        border-radius: 8px;
    }
    
    .auth_icon {
        width: 70px;
        height: 70px;
        margin-bottom: 25px;
    }
    
    .auth_icon .icon {
        width: 45px;
        height: 45px;
    }
    
    .auth_title {
        font-size: 22px;
        margin-bottom: 12px;
    }
    
    .auth_description {
        font-size: 15px;
        margin-bottom: 25px;
    }
    
    .auth_actions {
        margin-bottom: 25px;
    }
    
    .auth_footer {
        padding: 12px;
    }
    
    .agreement_text {
        font-size: 13px;
    }
}

/* Mobile styles */
@media screen and (max-width: 480px) {
    main {
        min-height: calc(100vh - 50px);
        align-items: center;
    }
    
    
    .auth_section {
        padding: 30px 20px;
        border-radius: 6px;
        margin: 10px 0;
    }
    
    .auth_icon {
        width: 60px;
        height: 60px;
        margin-bottom: 20px;
    }
    
    .auth_icon .icon {
        width: 40px;
        height: 40px;
    }
    
    .auth_title {
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    .auth_description {
        font-size: 14px;
        margin-bottom: 20px;
        padding: 0 5px;
    }
    
    .auth_actions {
        margin-bottom: 20px;
    }
    
    #telegram_login_container {
        width: 100%;
    }
    
    .auth_footer {
        padding: 10px;
        border-radius: 4px;
    }
    
    .agreement_text {
        font-size: 12px;
        line-height: 1.3;
        padding: 0 5px;
    }
}

/* Small mobile styles */
@media screen and (max-width: 360px) {
    .auth_section {
        padding: 25px 15px;
        margin: 5px 0;
    }
    
    .auth_icon {
        width: 55px;
        height: 55px;
        margin-bottom: 15px;
    }
    
    .auth_icon .icon {
        width: 35px;
        height: 35px;
    }
    
    .auth_title {
        font-size: 18px;
    }
    
    .auth_description {
        font-size: 13px;
        margin-bottom: 18px;
    }
    
    .auth_actions {
        margin-bottom: 18px;
    }
    
    .agreement_text {
        font-size: 11px;
    }
}

/* Landscape orientation for mobile */
@media screen and (max-height: 600px) and (orientation: landscape) {
    main {
        padding: 10px;
        align-items: flex-start;
        justify-content: center;
    }
    
    .auth_container {
        margin-top: 2%;
    }
    
    .auth_section {
        padding: 20px 25px;
        max-width: 400px;
    }
    
    .auth_icon {
        width: 50px;
        height: 50px;
        margin-bottom: 15px;
    }
    
    .auth_icon .icon {
        width: 30px;
        height: 30px;
    }
    
    .auth_title {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .auth_description {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .auth_actions {
        margin-bottom: 15px;
    }
    
    .auth_footer {
        padding: 8px;
    }
    
    .agreement_text {
        font-size: 12px;
    }
}

        .auth_actions {
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 20px;
            animation: fadeInUp 0.5s ease;
        }

        .telegram-login-button {
            display: inline-flex;
            align-items: center;
            gap: 12px;
            padding: 14px 28px;
            background: linear-gradient(135deg, #54a3db 0%, #4a90d9 100%);
            color: white;
            text-decoration: none;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            font-size: 16px;
            font-weight: 500;
            border-radius: 10px;
            box-shadow: 0 4px 15px rgba(84, 163, 219, 0.3);
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .telegram-login-button::before {
            content: "";
            width: 24px;
            height: 24px;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0zm5.894 8.221l-1.97 9.28c-.145.658-.537.818-1.084.508l-3-2.21-1.446 1.394c-.14.18-.357.295-.6.295l.213-3.054 5.56-5.022c.24-.213-.054-.334-.373-.121l-6.869 4.326-2.96-.924c-.64-.203-.658-.64.135-.954l11.566-4.458c.538-.196 1.006.128.828.941z'/%3E%3C/svg%3E");
            background-size: contain;
            background-repeat: no-repeat;
            background-position: center;
        }

        .telegram-login-button:hover {
            background: linear-gradient(135deg, #4a90d9 0%, #3d7bc8 100%);
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(84, 163, 219, 0.4);
        }

        .telegram-login-button:active {
            transform: translateY(0);
            box-shadow: 0 2px 10px rgba(84, 163, 219, 0.3);
        }

        .telegram-login-button::after {
            content: "";
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(
                45deg,
                transparent 30%,
                rgba(255, 255, 255, 0.1) 50%,
                transparent 70%
            );
            transform: rotate(45deg) translate(-50%, -50%);
            transition: all 0.6s;
            opacity: 0;
        }

        .telegram-login-button:hover::after {
            animation: shine 0.6s ease;
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes shine {
            0% {
                transform: rotate(45deg) translate(-50%, -50%);
                opacity: 0;
            }
            50% {
                opacity: 1;
            }
            100% {
                transform: rotate(45deg) translate(50%, 50%);
                opacity: 0;
            }
        }

        @media (max-width: 480px) {
            .telegram-login-button {
                padding: 12px 24px;
                font-size: 14px;
            }
            
            .telegram-login-button::before {
                width: 20px;
                height: 20px;
            }
        }