@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;
    --accent-rgb: 229, 9, 20;
    --card-bg: rgba(20, 20, 20, 0.8); /* Dark gray/black with opacity */
    --card-border: rgba(var(--accent-rgb), 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(var(--accent-rgb), 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(var(--accent-rgb), 0.12), 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;
}

/* Social Share Buttons */
.btn-bluesky {
    background: linear-gradient(135deg, #0085ff 0%, #005fcb 100%);
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    color: #fff;
}
.btn-bluesky:hover { background: linear-gradient(135deg, #006fd4 0%, #004ba8 100%); }
.btn-bluesky:disabled { opacity: 0.6; cursor: default; }

.badge-bluesky {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: #60a5fa;
    font-weight: 600;
}

.btn-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    color: #fff;
    border: none;
    cursor: pointer;
}
.btn-instagram:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-threads {
    background: #111111;
    border: 1px solid #333333;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    color: #f8fafc;
    cursor: pointer;
}
.btn-threads:hover {
    background: #1a1a1a;
    border-color: #555555;
    transform: translateY(-1px);
}

/* Share Modal (Instagram & Stories) */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.share-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.share-modal-content {
    position: relative;
    z-index: 10;
    max-width: 720px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
}
.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}
.share-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
}
.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.75rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 0.5rem;
}
.modal-close:hover {
    color: #fff;
}
.share-modal-body {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.5rem;
    align-items: start;
}
@media (max-width: 640px) {
    .share-modal-body {
        grid-template-columns: 1fr;
    }
}
.story-preview-wrapper {
    display: flex;
    justify-content: center;
}
.story-card-preview {
    width: 100%;
    max-width: 240px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    aspect-ratio: 9 / 16;
    background: #000;
}
.story-card-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.modal-buttons-grid {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

