/* 
   BypassPro - Premium Dark Theme 
   Glassmorphism & Neon Accents
*/

:root {
    --bg-dark: #0f0c29;
    --bg-gradient: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(12px);

    --primary-accent: #00f260;
    /* Neon Green */
    --secondary-accent: #0575e6;
    /* Electric Blue */
    --text-main: #ffffff;
    --text-muted: #b3b3b3;

    --font-main: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --radius-lg: 24px;
    --radius-md: 12px;
    --shadow-soft: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-main);
    background: var(--bg-dark);
    background-image: var(--bg-gradient);
    min-height: 100vh;
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 10s infinite ease-in-out;
}

.orb-1 {
    background: var(--secondary-accent);
    top: -50px;
    left: -50px;
}

.orb-2 {
    background: var(--primary-accent);
    bottom: -50px;
    right: -50px;
    animation-delay: 5s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, 50px);
    }
}

/* App Container */
.app-container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Header */
.app-header {
    text-align: center;
    margin-bottom: 10px;
}

.logo-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 5px;
}

.logo-area i {
    font-size: 32px;
    color: var(--primary-accent);
}

.app-header h1 {
    font-weight: 700;
    font-size: 32px;
    letter-spacing: -1px;
}

.highlight {
    background: linear-gradient(to right, var(--primary-accent), var(--secondary-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-muted);
    font-size: 14px;
}

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-soft);
}

/* Alert Box */
.alert-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 204, 0, 0.1);
    /* Yellow tint */
    border: 1px solid rgba(255, 204, 0, 0.3);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    font-size: 13px;
    color: #ffda44;
}

.alert-box i {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.alert-box.warning p {
    line-height: 1.4;
    opacity: 0.9;
}

/* Form Elements */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    font-size: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

input[type="text"] {
    width: 100%;
    padding: 14px 16px 14px 44px;
    /* Space for icon */
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 15px;
    transition: all 0.3s ease;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--secondary-accent);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(5, 117, 230, 0.1);
}

input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Primary Button */
.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--secondary-accent), #021b79);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(5, 117, 230, 0.4);
}

.btn-primary:active {
    transform: translateY(1px);
}


.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    filter: saturate(0);
}

/* Telegram Button */
.btn-telegram {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    margin-top: 20px;
    background: linear-gradient(135deg, #229ED9 0%, #0088cc 100%);
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(34, 158, 217, 0.3);
}

.btn-telegram:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(34, 158, 217, 0.5);
}

.btn-telegram i {
    font-size: 20px;
}

/* Spinner */
.spinner {
    display: none;
    /* Hidden by default */
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}


.btn-primary.loading .spinner,
.btn-primary:disabled .spinner {
    display: block;
}

.btn-primary.loading i,
.btn-primary.loading span,
.btn-primary:disabled i,
.btn-primary:disabled span {
    display: none;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Terminal Log */
.terminal-card {
    padding: 0;
    overflow: hidden;
    background: #0d0d0d;
    border-color: #333;
}

.terminal-header {
    background: #1a1a1a;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #333;
}

.terminal-dots {
    display: flex;
    gap: 6px;
    margin-right: 12px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.red {
    background: #ff5f56;
}

.yellow {
    background: #ffbd2e;
}

.green {
    background: #27c93f;
}

.terminal-title {
    font-family: var(--font-mono);
    font-size: 12px;
    color: #888;
}

.log-container {
    padding: 16px;
    font-family: var(--font-mono);
    font-size: 12px;
    height: 200px;
    /* Log height */
    overflow-y: auto;
    color: #d4d4d4;
    scroll-behavior: smooth;
}

/* Custom Scrollbar for Logs */
.log-container::-webkit-scrollbar {
    width: 6px;
}

.log-container::-webkit-scrollbar-track {
    background: #0d0d0d;
}

.log-container::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

.log-entry {
    margin-bottom: 6px;
    line-height: 1.5;
    word-break: break-word;
}

/* Log Colors matching previous logic if possible, or new ones */
.log-success {
    color: var(--primary-accent);
}

.log-error {
    color: #ff5f56;
}

.log-info {
    color: #5bc0eb;
}

.log-warning {
    color: #fce100;
}

/* Result Box */
.result-box {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-accent);
    display: none;
    font-size: 14px;
    line-height: 1.5;
}

.result-box.success {
    background: rgba(39, 201, 63, 0.15);
    border-color: #27c93f;
    color: #cdffd3;
    display: block;
    animation: slideDown 0.3s ease;
}

.result-box.error {
    background: rgba(255, 95, 86, 0.15);
    border-color: #ff5f56;
    color: #ffdcdb;
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer */
.app-footer {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

.link-highlight {
    color: var(--secondary-accent);
    text-decoration: none;
    font-weight: 500;
}

.link-highlight:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 480px) {
    .glass-card {
        padding: 20px;
    }

    .app-header h1 {
        font-size: 26px;
    }
}

/* Authentication & Profile Styles */
.auth-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    padding: 10px;
    animation: fadeIn 0.5s ease;
}

.auth-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
    background: linear-gradient(to right, #fff, #bbb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}


.user-profile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Spread content */
    gap: 15px;
    background: rgba(255, 255, 255, 0.08);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    padding: 16px 24px;
    /* More padding */
    border-radius: 16px;
    /* Slightly less rounded than 50px for card look */
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    margin-bottom: 25px;
    width: 100%;
    /* Full width */
}

.user-profile-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--primary-accent);
    box-shadow: 0 0 10px rgba(0, 242, 96, 0.3);
    /* Neon glow */
    object-fit: cover;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-name {
    font-weight: 700;
    font-size: 16px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.verified-badge {
    color: var(--primary-accent);
    font-size: 14px;
}

.user-role {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logout-btn {
    font-size: 13px;
    color: #fff;
    background: #ff5f56;
    /* Solid Red */
    padding: 8px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    box-shadow: 0 4px 10px rgba(255, 95, 86, 0.3);
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.3px;
}

.logout-btn:hover {
    background: #ff3b30;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 95, 86, 0.5);
}

.logout-btn i {
    font-size: 16px;
    font-weight: bold;
}

.step-card {
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    padding: 20px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.step-icon {
    font-size: 40px;
    color: var(--secondary-accent);
    margin-bottom: 10px;
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Telegram Login Widget Override (if possible) */
iframe[id^="telegram-login"] {
    border-radius: 20px !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}