/* || RESET & VARIABLES */
:root {
    --bg-color: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    --font-main: 'Roboto', sans-serif;
    --border-radius: 12px;
    --container-width: 1200px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.08), transparent 25%);
}

/* || TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 700;
}

h1 { font-size: 3.5rem; letter-spacing: -1px; background: linear-gradient(to right, #fff, #cbd5e1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
h2 { font-size: 2.5rem; color: var(--text-primary); }
h3 { font-size: 1.5rem; color: var(--text-primary); }

p { color: var(--text-secondary); margin-bottom: 1rem; }
a { text-decoration: none; color: var(--primary-color); transition: var(--transition); }
a:hover { color: var(--accent-color); }

/* || UTILITIES */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-full { width: 100%; }
.btn-small { padding: 0.5rem 1rem; font-size: 0.875rem; }

/* || COMPONENTS */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--glass-shadow);
}

.card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

/* || HEADER */
header {
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span { color: var(--primary-color); }

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-links a:hover, .nav-links a.active {
    color: white;
}

/* || HERO */
.hero {
    padding: 8rem 0 6rem;
    text-align: center;
    position: relative;
}

.hero h1 { margin-bottom: 1.5rem; }
.hero p { font-size: 1.25rem; max-width: 600px; margin: 0 auto 2.5rem; }

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

/* || GRID LAYOUTS */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* || FORMS */
.form-group { margin-bottom: 1.5rem; }
label { display: block; margin-bottom: 0.5rem; color: var(--text-primary); font-weight: 500; }

input, textarea, select {
    width: 100%;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    color: white;
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition);
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* || DASHBOARD */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.credits-display {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
}
.credits-display h3 { color: rgba(255,255,255,0.8); font-size: 1rem; margin-bottom: 0.5rem; }
.credits-display .count { font-size: 2.5rem; font-weight: 800; color: white; }

.prompt-templates { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.prompt-templates button {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}
.prompt-templates button:hover { background: rgba(255,255,255,0.1); color: white; }

.history-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.history-item:last-child { border-bottom: none; }
.history-item img { width: 100px; height: 100px; object-fit: cover; border-radius: 8px; }
.history-info { flex-grow: 1; }

/* || PAYMENT CARD */
.payment-card {
    display: flex;
    gap: 2rem;
    background: #fff; /* White bg for QR contrast */
    color: #333; /* Dark text for readability on white */
    padding: 2rem;
    border-radius: var(--border-radius);
    align-items: center;
    flex-wrap: wrap;
}
.payment-card h3, .payment-card p { color: #333; }

/* || LEGAL TABS */
.tabs { display: flex; gap: 1rem; margin-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 1rem; }
.tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    font-weight: 600;
    position: relative;
}
.tab-btn.active { color: var(--primary-color); }
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1.1rem;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
}
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.5s ease; }

/* || FOOTER */
footer {
    margin-top: auto;
    padding: 3rem 0;
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}
footer .socials { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 1.5rem; }
footer .socials a { color: var(--text-secondary); font-size: 1.5rem; }

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

/* || RESPONSIVE */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    header nav { flex-direction: column; gap: 1rem; }
    .nav-links { flex-direction: column; gap: 1rem; }
    .grid-3 { grid-template-columns: 1fr; }
    .history-item { flex-direction: column; text-align: center; }
}