@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700&display=swap');

:root {
    --bg-color: #050505; /* Deep black */
    --text-color: #f8fafc;
    --text-muted: #a3a3a3;
    --accent: #e50914; /* Vibrant Red */
    --accent-hover: #b80710;
    --card-bg: rgba(20, 20, 20, 0.8); /* Dark gray/black with opacity */
    --card-border: rgba(229, 9, 20, 0.3); /* Reddish border */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(229, 9, 20, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(184, 7, 16, 0.15), transparent 25%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(auto, 600px);
    justify-content: center;
    padding: 2rem 1rem;
    gap: 2rem;
    align-content: start;
}

/* Typography */
h1, h2, h3 {
    font-weight: 700;
}
a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover {
    color: var(--accent-hover);
}

/* Header & Footer */
header {
    text-align: center;
    padding: 3rem 1rem 1rem 1rem;
}
header h1 {
    font-size: 2.5rem;
    background: linear-gradient(to right, #e50914, #ff4b4b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}
header p {
    color: var(--text-muted);
}
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: auto;
}

/* Glassmorphism Cards */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card.hoverable:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
label {
    font-size: 0.9rem;
    font-weight: 600;
}
textarea, input[type="text"], input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(10, 10, 10, 0.6);
    border: 1px solid var(--card-border);
    border-radius: 0.5rem;
    color: var(--text-color);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
textarea:focus, input[type="text"]:focus, input[type="password"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(229, 9, 20, 0.3);
}
.btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    display: inline-block;
    text-align: center;
}
.btn:hover {
    background: var(--accent-hover);
}
.btn:active {
    transform: scale(0.98);
}
.btn-danger {
    background: #ef4444;
}
.btn-danger:hover {
    background: #dc2626;
}

/* Checkbox Toggle */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}
.checkbox-group input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--accent);
}

/* Hidden elements */
.hidden {
    display: none !important;
}

/* Question Feed */
.q-feed {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}
.q-item {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.q-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-muted);
}
.q-content {
    font-size: 1.1rem;
    font-weight: 600;
}
.q-answer {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 0.5rem;
    border-left: 3px solid var(--accent);
}

/* Admin Dashboard */
.admin-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
.admin-nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}
.admin-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}
.alert-success {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: #4ade80;
}
.alert-error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #f87171;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}
