/* ==========================================
   CSS VARIABLES & RESET
   ========================================== */
:root {
    --primary: #ff4b72;
    --primary-hover: #ff2a55;
    --secondary: #8a2be2;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-input: #334155;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success: #10b981;
    --error: #ef4444;
    --premium: #fbbf24;
    --border-color: #334155;
    --font-family: 'Inter', system-ui, sans-serif;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-hover); }

h1, h2, h3, h4 { line-height: 1.2; margin-bottom: 0.5em; }
.text-primary { color: var(--primary); }
.text-premium { color: var(--premium); }
.w-full { width: 100%; }
.hidden { display: none !important; }

.logo img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 4px;
}

/* BUTTONS */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.75rem 1.5rem; border-radius: var(--radius-md); font-weight: 600;
    cursor: pointer; border: none; transition: var(--transition); font-family: inherit; font-size: 1rem;
}
.btn-primary { background-color: var(--primary); color: white; }
.btn-primary:hover:not(:disabled) { background-color: var(--primary-hover); }
.btn-outline { background-color: transparent; border: 1px solid var(--border-color); color: var(--text-main); }
.btn-outline:hover { border-color: var(--text-main); }
.btn-large { padding: 1rem 2rem; font-size: 1.125rem; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-success { background-color: var(--success); color: white; }
.btn-danger { background-color: var(--error); color: white; }

.icon-btn {
    background: rgba(0,0,0,0.5); border: none; color: white; width: 40px; height: 40px;
    border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: var(--transition);
}
.icon-btn:hover { background: var(--primary); transform: scale(1.1); }

/* FORMS */
.form-group { margin-bottom: 1.5rem; position: relative; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; color: var(--text-muted); }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 0.75rem 1rem; background-color: var(--bg-input);
    border: 1px solid var(--border-color); border-radius: var(--radius-md); color: var(--text-main);
    font-family: inherit; transition: var(--transition);
}
.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat; background-position: right 1rem center; background-size: 1em; padding-right: 2.5rem;
}
.form-group input[type="file"] { padding: 0.5rem; cursor: pointer; }
.form-group input[type="file"]::file-selector-button {
    background-color: var(--bg-card); border: 1px solid var(--border-color); color: var(--text-main);
    padding: 0.5rem 1rem; border-radius: var(--radius-sm); margin-right: 1rem; cursor: pointer;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(255, 75, 114, 0.2);
}
.form-group input.invalid { border-color: var(--error); }
.error-message { color: var(--error); font-size: 0.875rem; margin-top: 0.25rem; display: block; min-height: 1.25rem; }

/* MODALS & TOASTS */
.modal { border: none; background: transparent; margin: auto; padding: 0; }
.modal::backdrop { background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(4px); }
.modal-content {
    background-color: var(--bg-card); padding: 2rem; border-radius: var(--radius-lg);
    width: 90vw; max-width: 400px; position: relative; border: 1px solid var(--border-color);
}
.close-btn { position: absolute; top: 1rem; right: 1rem; background: transparent; border: none; color: var(--text-muted); cursor: pointer; }
.close-btn:hover { color: var(--text-main); }

#toast-container {
    position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%);
    z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem;
}
.toast {
    background-color: var(--bg-card); color: var(--text-main); padding: 1rem 1.5rem;
    border-radius: var(--radius-md); box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    border-left: 4px solid var(--primary); animation: slideUp 0.3s ease forwards;
    display: flex; align-items: center; gap: 0.5rem;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--error); }

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
