:root {
    --bg-dark: #0f172a;
    --primary: #8b5cf6;
    --primary-glow: rgba(139, 92, 246, 0.5);
    --secondary: #3b82f6;
    --success: #10b981;
    --error: #ef4444;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --terminal-bg: #09090b;
    --terminal-text: #34d399;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Animated Background Blobs */
.background-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.6;
    border-radius: 50%;
    animation: float 20s infinite alternate ease-in-out;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: var(--secondary);
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: #ec4899;
    top: 40%;
    left: 40%;
    animation-duration: 25s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* Main Container */
.container {
    position: relative;
    z-index: 10;
    width: 90%;
    /* Increased from 100% to allow margin on small screens */
    max-width: 460px;
    padding: 2.5rem;
    border-radius: 24px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    opacity: 0;
    animation: popIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes popIn {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Tabs */
.tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn:hover {
    color: var(--text-main);
}

.tab-btn.active {
    color: var(--primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1.2rem;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
    border-radius: 2px 2px 0 0;
    box-shadow: 0 -2px 10px var(--primary-glow);
}

.section-content {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.section-content.active-section {
    display: block;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 2rem;
}

.avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    margin-bottom: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--glass-border);
    transition: transform 0.3s ease;
    object-fit: cover;
}

.avatar-placeholder:hover {
    transform: scale(1.05) rotate(-5deg);
}

.terminal-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    margin: 0 auto 1rem auto;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--glass-border);
    background: var(--terminal-bg);
    color: var(--terminal-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    font-family: 'Fira Code', monospace;
    transition: transform 0.3s ease;
}

.terminal-icon:hover {
    transform: scale(1.05) rotate(5deg);
}

.header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    font-weight: 300;
}

/* Form Styles */
.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group input {
    width: 100%;
    padding: 1rem 1.2rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    z-index: 2;
    position: relative;
}

.input-group label {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
    transition: all 0.3s ease;
    font-size: 1rem;
    z-index: 3;
}

.input-group input:focus,
.input-group input:not(:placeholder-shown) {
    background: rgba(15, 23, 42, 0.8);
    border-color: var(--primary);
}

.input-group input:focus+label,
.input-group input:not(:placeholder-shown)+label {
    top: 0;
    font-size: 0.75rem;
    padding: 0 0.4rem;
    background: #111827;
    color: var(--primary);
    border-radius: 4px;
}

.input-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    background: var(--primary);
    filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.input-group input:focus~.input-glow {
    opacity: 0.3;
}

/* Button */
.glow-button {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glow-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.glow-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px var(--primary-glow);
}

.glow-button:hover::before {
    left: 100%;
}

.glow-button:active {
    transform: translateY(0);
}

/* Loader */
.btn-loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    position: absolute;
}

.loader-hidden {
    display: none;
    opacity: 0;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.glow-button.loading .btn-text {
    opacity: 0;
}

.glow-button.loading .btn-loader {
    display: block;
    opacity: 1;
}

/* Status Messages */
.status-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    text-align: center;
    font-weight: 400;
    animation: fadeIn 0.3s ease forwards;
}

.status-message.hidden {
    display: none;
}

.status-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.status-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

/* Terminal Output Area */
.terminal-output-container {
    margin-top: 1.5rem;
    border-radius: 12px;
    background-color: var(--terminal-bg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
    font-family: 'Fira Code', monospace;
}

.terminal-header {
    background: #1e1e24;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red {
    background-color: #ff5f56;
}

.dot.yellow {
    background-color: #ffbd2e;
}

.dot.green {
    background-color: #27c93f;
}

.terminal-title {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-left: 10px;
}

.terminal-output {
    padding: 1rem;
    height: 150px;
    overflow-y: auto;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #fff;
    word-break: break-all;
}

.terminal-output::-webkit-scrollbar {
    width: 8px;
}

.terminal-output::-webkit-scrollbar-track {
    background: transparent;
}

.terminal-output::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.log-info {
    color: var(--text-muted);
}

.log-success {
    color: var(--terminal-text);
}

.log-error {
    color: #f87171;
}

.log-command {
    color: #38bdf8;
    font-weight: bold;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .container {
        padding: 1.5rem;
        width: 95%;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .header p {
        font-size: 0.85rem;
    }

    .tab-btn {
        font-size: 0.95rem;
        padding: 0.4rem 0.8rem;
    }

    .terminal-icon,
    .avatar-placeholder {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .terminal-output {
        height: 120px;
        font-size: 0.75rem;
    }
}