/* Sora For All Styles */
:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --success-color: #10b981;
    --success-hover: #059669;
    --secondary-color: #6b7280;
    --secondary-hover: #4b5563;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;

    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-family-heading: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border-color: #334155;
}

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

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Theme Toggle */
.theme-toggle-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
}

#theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
}

#theme-toggle:hover {
    background: var(--bg-tertiary);
    transform: scale(1.05);
}

#theme-toggle svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

#theme-toggle .moon {
    display: block;
}

#theme-toggle .sun {
    display: none;
}

[data-theme="dark"] #theme-toggle .moon {
    display: none;
}

[data-theme="dark"] #theme-toggle .sun {
    display: block;
}

/* Main Content */
.main-content {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.sora-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

/* Main Section */
.main-section {
    text-align: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.header {
    margin-bottom: 2rem;
}

.title {
    font-family: var(--font-family-heading);
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.title i {
    color: var(--primary-color);
    font-size: 2.5rem;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.invite-count {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-tertiary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-primary);
}

.invite-count i {
    color: var(--info-color);
}

.action-section {
    margin-top: 2rem;
}

/* Rules Section */
.rules-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.rules-card {
    text-align: center;
}

.rules-title {
    font-family: var(--font-family-heading);
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.rules-title i {
    color: var(--warning-color);
}

.rules-list {
    margin-bottom: 2.5rem;
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.rule-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.rule-number {
    background: var(--primary-color);
    color: white;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.rule-text {
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.5;
}

.rules-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Code Section */
.code-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.code-card {
    text-align: center;
}

.code-title {
    font-family: var(--font-family-heading);
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.code-title i {
    color: var(--success-color);
}

.code-display {
    background: var(--bg-tertiary);
    border: 2px solid var(--success-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.code-display code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--success-color);
    background: none;
    padding: 0;
    word-break: break-all;
    flex: 1;
}

.code-instructions {
    text-align: left;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.code-instructions p {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.code-instructions ol {
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.code-instructions li {
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    position: relative;
    overflow: hidden;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-success {
    background: var(--success-color);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-success:hover:not(:disabled) {
    background: var(--success-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-icon {
    padding: 0.75rem;
    min-width: auto;
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-md);
}

.btn-icon i {
    font-size: 1.125rem;
}

/* Code Result Section */
.code-result-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.code-result-card {
    text-align: center;
}

.code-result-title {
    font-family: var(--font-family-heading);
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.code-result-title i {
    color: var(--success-color);
}

.code-result-display {
    background: var(--bg-tertiary);
    border: 2px solid var(--success-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.code-result-display code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--success-color);
    background: none;
    padding: 0;
    word-break: break-all;
    flex: 1;
}

.code-result-message {
    margin-bottom: 2rem;
}

.code-result-message p {
    font-size: 1.125rem;
    color: var(--text-primary);
}

.code-result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Next Steps Section */
.next-steps-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.next-steps-card {
    text-align: center;
}

.next-steps-title {
    font-family: var(--font-family-heading);
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.next-steps-title i {
    color: var(--success-color);
}

.next-steps-content {
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

.next-steps-content p {
    font-size: 1.125rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.next-steps-content ol {
    padding-left: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.next-steps-content li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.code-input-section {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.code-input-section input {
    flex: 1;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    text-transform: uppercase;
    text-align: center;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.3s ease;
}

.code-input-section input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.help-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
}

/* Button Variants */
.btn-danger {
    background: var(--danger-color);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Loading Animation */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }

    .main-section,
    .rules-section,
    .code-section {
        padding: 2rem 1.5rem;
    }

    .title {
        font-size: 2.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .title i {
        font-size: 2rem;
    }

    .rules-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    .code-display {
        flex-direction: column;
        text-align: center;
    }

    .code-display code {
        font-size: 1rem;
    }
}

/* Donate Section Styles */
.donate-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.donate-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    max-width: 500px;
    width: 100%;
    text-align: center;
}

.donate-header h2 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 2rem;
    font-weight: 700;
}

.donate-header h2 i {
    color: #e74c3c;
    margin-right: 0.5rem;
}

.donate-header p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.donate-form {
    margin-bottom: 2rem;
}

.input-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.input-group label {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.input-group input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    background: var(--input-bg);
    color: var(--text-primary);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.input-group input:invalid {
    border-color: #e74c3c;
}

.donate-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.donate-buttons .btn {
    flex: 1;
    min-width: 150px;
}

.donate-info {
    background: var(--info-bg);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: left;
}

.donate-info p {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

.donate-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.donate-info li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.donate-info li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.donate-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.donate-warning p {
    color: #856404;
    margin: 0;
    font-size: 0.9rem;
}

/* Mobile styles for donate section */
@media (max-width: 768px) {
    .donate-section {
        padding: 1rem;
    }

    .donate-card {
        padding: 1.5rem;
    }

    .donate-header h2 {
        font-size: 1.5rem;
    }

    .donate-buttons {
        flex-direction: column;
    }

    .donate-buttons .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1.125rem;
    }

    .rules-title,
    .code-title {
        font-size: 1.5rem;
    }

    .rule-item {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
}