* {
    box-sizing: border-box;
}

:root {
    --bg-color: #f7f9fc;
    --card-bg: #ffffff;
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --radius: 16px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    border-color: #ddd;
}

/* Payment Modal Styles */
.payment-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.payment-option {
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.payment-option:hover {
    border-color: var(--primary-color);
    background: #f0fdf4;
}

.payment-option.popular {
    border-color: #fbbf24;
    background: #fffbeb;
}

.payment-tag {
    position: absolute;
    top: 0;
    right: 0;
    background: #fbbf24;
    color: #78350f;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.25rem 0.5rem;
    border-bottom-left-radius: var(--radius);
}

.payment-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
}

.payment-coins {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-top: 0.25rem;
}

.payment-bonus {
    font-size: 0.9rem;
    color: #16a34a;
    font-weight: 600;
    margin-top: 0.25rem;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    flex: 1;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease;
}

/* .card:hover {
    transform: translateY(-2px);
} */

.card-header {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

textarea,
input[type="file"],
select,
input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    max-width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 1rem;
    background: #f8fafc;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
}

.file-upload-label:hover {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
    color: var(--primary-color);
}

input[type="file"] {
    display: none;
}

textarea:focus,
select:focus,
input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
}

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

.btn:disabled {
    background-color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.7;
}

.status-area {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    display: none;
}

.status-area.active {
    display: block;
}

.progress-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.3s ease;
}

.result-area {
    margin-top: 1rem;
}

.error-message {
    color: #ef4444;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.voice-select-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s;
}

.radio-label:hover {
    background: #f8fafc;
}

input[type="radio"]:checked+.radio-content {
    color: var(--primary-color);
    font-weight: 600;
}

.radio-label:has(input:checked) {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

input[type="radio"] {
    accent-color: var(--primary-color);
}

/* Auth Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
}

.modal-overlay.active {
    display: flex;
}

.auth-card {
    max-height: 90%;
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius);
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
}

.auth-header p {
    color: var(--text-muted);
    margin: 0;
}

.auth-tabs {
    display: flex;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.auth-tab {
    flex: 1;
    padding: 0.75rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.social-login {
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-social {
    width: auto;
    background: white;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
}

.btn-social:hover {
    background: #f8fafc;
}

.user-nav {
    position: fixed;
    top: 1rem;
    right: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    font-weight: 500;
    display: none;
    align-items: center;
    gap: 10px;
}

.logout-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    display: none;
}

.logout-btn:hover {
    color: #ef4444;
}

.show-when-logged-in {
    display: none;
}

/* Footer Styles */
.site-footer {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #e2e8f0;
    padding: 3rem 1rem 1rem;
    margin-top: 4rem;
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #7c3aed, #2563eb);
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
}

.footer-brand h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-brand p {
    color: #94a3b8;
    font-size: 0.9rem;
    margin: 0;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.footer-section h4 {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #cbd5e1;
    margin: 0 0 1rem 0;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    padding: 0.35rem 0;
    color: #94a3b8;
    font-size: 0.9rem;
}

.footer-section a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: #60a5fa;
}

.footer-bottom {
    max-width: 1000px;
    margin: 2rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid #334155;
    text-align: center;
}

.footer-bottom p {
    color: #64748b;
    font-size: 0.85rem;
    margin: 0;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 2rem;
    transition: color 0.2s;
}

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

/* Password Toggle */
.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper input {
    padding-right: 40px;
    /* Space for the eye icon */
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
}

.toggle-password:hover {
    color: var(--primary-color);
}