/* Telegram-style Design */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #a8b5c8 0%, #c8d4e6 50%, #e8eef7 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="80" cy="40" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="40" cy="80" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.app-container {
    width: 100%;
    max-width: 380px;
    position: relative;
    z-index: 1;
}

/* Status Timer */
.status-pill {
    position: absolute;
    top: -15px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 18px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.status-normal {
    color: #6b7280;
}

.status-urgent {
    color: #ef4444;
    background: rgba(254, 242, 242, 0.95);
}

.status-icon {
    display: none;
}

/* Card */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 50px 35px 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
}

/* Avatar */
.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4a90e2, #357abd);
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 600;
    color: white;
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.9);
}



/* Text */
.user-name {
    font-size: 22px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.brain-emoji {
    font-size: 20px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.user-handle {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 40px;
}

.verification-title {
    font-size: 18px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 32px;
    line-height: 1.4;
}



/* Messages */
.message {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
}

.error-message {
    background: #fef2f2;
    color: #dc2626;
}

.success-message {
    background: #f0fdf4;
    color: #16a34a;
}

.message-icon {
    width: 20px;
    height: 20px;
}

/* Button */
.primary-button {
    width: 100%;
    padding: 16px 24px;
    background: #22c55e;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    margin: 32px 0 24px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.primary-button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
}

.primary-button:hover:enabled {
    background: #16a34a;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4);
}

/* Debug */
.debug-badge {
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    color: #9ca3af;
    font-family: -apple-system, BlinkMacSystemFont, monospace;
/*     background: rgba(156, 163, 175, 0.1);*/
    margin: 8px 0;

}

/* Cloudflare Turnstile Styling */
.captcha-wrapper {
    margin: 24px 0;
    display: flex;
    justify-content: center;
}

.cf-turnstile {
    transform: scale(0.9);
    transform-origin: center;
}

/* Messages */
.message {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 14px;
    margin-bottom: 20px;
    font-weight: 500;
    font-size: 14px;
}

.error-message {
    background: rgba(254, 242, 242, 0.9);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.success-message {
    background: rgba(240, 253, 244, 0.9);
    color: #16a34a;
    border: 1px solid rgba(22, 163, 74, 0.2);
}

.message-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Loading State */
.loading-state {
    display: none;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.loading-spinner {
    display: flex;
    gap: 4px;
}

.spinner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6b7280;
    animation: bounce 1.4s ease-in-out infinite both;
}

.spinner-dot:nth-child(1) { animation-delay: -0.32s; }
.spinner-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { 
        transform: scale(0);
    } 40% { 
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 480px) {
    body {
        padding: 16px;
    }
    
    .card {
        padding: 40px 24px 32px;
    }

    .avatar {
        width: 80px;
        height: 80px;
        font-size: 24px;
    }
    
    .user-name {
        font-size: 20px;
    }
    
    .verification-title {
        font-size: 16px;
    }
    
    .status-pill {
        right: 16px;
        font-size: 12px;
        padding: 6px 12px;
    }
}