/* CSS Variables */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a25;
    --bg-card-hover: #222230;
    --border-color: #2a2a3a;
    --border-highlight: #4a4a6a;
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;
    
    --accent-primary: #8b5cf6;
    --accent-secondary: #6366f1;
    --accent-gradient: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #3b82f6 100%);
    
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --twitter: #1d9bf0;
    
    --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Space Mono', 'Fira Code', monospace;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.3);
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Base Styles */
html {
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Effects */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* Container */
.container {
    position: relative;
    z-index: 1;
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 24px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    display: flex;
    justify-content: center;
    margin-bottom: 48px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    font-size: 48px;
    filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.5));
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 28px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Main Content */
main {
    flex: 1;
}

/* Steps */
.step {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-header {
    text-align: center;
    margin-bottom: 40px;
}

.step-header h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.step-header p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Back Button */
.btn-back {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    padding: 8px 0;
    margin-bottom: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
}

.btn-back:hover {
    color: var(--text-primary);
}

/* Role Cards */
.role-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.role-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 32px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.role-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-highlight);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.role-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.role-card h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.role-card > p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    min-height: 48px;
}

.role-perks {
    list-style: none;
    text-align: left;
    margin-bottom: 24px;
    padding: 20px;
    background: rgba(139, 92, 246, 0.05);
    border-radius: var(--radius-md);
}

.role-perks li {
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.role-perks li:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-highlight);
}

.btn-twitter {
    background: var(--twitter);
    color: white;
    padding: 14px 28px;
}

.btn-twitter:hover {
    background: #1a8cd8;
    transform: translateY(-2px);
}

.btn-large {
    padding: 16px 32px;
    font-size: 18px;
    width: 100%;
    max-width: 400px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-icon {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--bg-card-hover);
}

/* Form Section */
.form-section {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.input-group {
    width: 100%;
}

.input-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 14px;
    transition: all 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.input-group input::placeholder {
    color: var(--text-muted);
}

.input-hint {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Info Box */
.info-box {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius-md);
    width: 100%;
}

.info-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.info-box strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.info-box p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

/* Verification Section */
.verification-section {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.verification-card {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 32px;
}

.verification-step {
    display: flex;
    gap: 20px;
    padding: 20px 0;
}

.verification-step:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.step-number {
    width: 36px;
    height: 36px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.tweet-preview {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.tweet-preview p {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-secondary);
    word-break: break-all;
    line-height: 1.5;
}

.verification-note {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
}

/* Success Section */
.success-container, .error-container {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.success-icon, .error-icon {
    font-size: 80px;
    margin-bottom: 24px;
}

.success-container h1, .error-container h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
}

.success-container > p, .error-container > p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

/* API Key Display */
.api-key-display {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 32px;
    margin-bottom: 40px;
}

.api-key-display label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.api-key-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-secondary);
    border: 2px solid var(--success);
    border-radius: var(--radius-md);
    padding: 16px;
}

.api-key-box code {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 16px;
    color: var(--success);
    word-break: break-all;
}

.warning-text {
    display: block;
    font-size: 13px;
    color: var(--warning);
    margin-top: 12px;
}

/* Next Steps */
.next-steps {
    text-align: left;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 32px;
}

.next-steps h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.next-steps-content ol {
    margin-bottom: 24px;
    padding-left: 24px;
}

.next-steps-content li {
    padding: 8px 0;
    color: var(--text-secondary);
}

.next-steps-content code {
    font-family: var(--font-mono);
    font-size: 13px;
    background: var(--bg-secondary);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    color: var(--accent-primary);
}

.next-steps-content .btn {
    width: 100%;
}

/* Footer */
footer {
    margin-top: 60px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

footer p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent-primary);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 24px;
    font-size: 14px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.toast.error {
    border-color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 15, 0.9);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

.loading-overlay p {
    font-size: 16px;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 24px 16px;
    }

    .step-header h1 {
        font-size: 28px;
    }

    .role-cards {
        grid-template-columns: 1fr;
    }

    .role-card {
        padding: 24px;
    }

    .verification-card {
        padding: 24px;
    }

    .verification-step {
        flex-direction: column;
        gap: 12px;
    }

    .tweet-preview {
        flex-direction: column;
    }
}

