/* Telegram Auth Popup Styles */
.telegram-auth-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.telegram-auth-popup.active {
    opacity: 1;
    visibility: visible;
}

.telegram-auth-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.telegram-auth-content {
    position: relative;
    background: var(--bg-color, #1a1a2e);
    border-radius: 20px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    animation: slideUp 0.3s ease forwards;
}

.telegram-auth-popup.active .telegram-auth-content {
    transform: scale(1);
}

@keyframes slideUp {
    from {
        transform: translateY(30px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.telegram-auth-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #fff;
}

.telegram-auth-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.telegram-auth-close svg {
    width: 20px;
    height: 20px;
}

.telegram-auth-body {
    text-align: center;
}

.telegram-auth-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 25px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.telegram-auth-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 5px 15px rgba(42, 171, 238, 0.3));
}

.telegram-auth-title {
    font-size: 26px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 15px;
}

.telegram-auth-description {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 30px;
    line-height: 1.6;
}

.telegram-auth-status {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin: 0 0 25px;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.telegram-auth-status p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.telegram-auth-loader {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(42, 171, 238, 0.2);
    border-top-color: #2AABEE;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.telegram-auth-button {
    width: 100%;
    padding: 16px 30px;
    background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 5px 20px rgba(42, 171, 238, 0.3);
}

.telegram-auth-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(42, 171, 238, 0.4);
}

.telegram-auth-button:active:not(:disabled) {
    transform: translateY(0);
}

.telegram-auth-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.telegram-auth-button svg {
    width: 20px;
    height: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .telegram-auth-content {
        padding: 30px 20px;
        width: 95%;
    }
    
    .telegram-auth-title {
        font-size: 22px;
    }
    
    .telegram-auth-description {
        font-size: 14px;
    }
    
    .telegram-auth-icon {
        width: 80px;
        height: 80px;
    }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .telegram-auth-content {
        background: #1a1a2e;
    }
}

/* Light theme support */
@media (prefers-color-scheme: light) {
    .telegram-auth-content {
        background: #ffffff;
    }
    
    .telegram-auth-title {
        color: #1a1a2e;
    }
    
    .telegram-auth-description,
    .telegram-auth-status p {
        color: rgba(0, 0, 0, 0.7);
    }
    
    .telegram-auth-status {
        background: rgba(0, 0, 0, 0.05);
    }
    
    .telegram-auth-close {
        background: rgba(0, 0, 0, 0.1);
        color: #1a1a2e;
    }
    
    .telegram-auth-close:hover {
        background: rgba(0, 0, 0, 0.15);
    }
}
