/* =============================================
   SHARED THEME - Burgundy Mystical Aesthetic
   Apply this to all application pages
   ============================================= */

/* ======================================
   ROOT VARIABLES
   ====================================== */
:root {
    /* Background */
    --bg-dark: #0d0508;
    --bg-card: rgba(20, 8, 12, 0.95);
    --bg-section: rgba(30, 12, 18, 0.9);

    /* Accent Colors - Burgundy Wine Theme */
    --accent-burgundy: #5c1a28;
    --accent-wine: #3d0f16;
    --accent-purple: #8b5cf6;
    --accent-purple-dark: #6d28d9;
    --accent-gold: #f59e0b;
    --accent-blood: #8b0000;
    --accent-green: #22c55e;

    /* Blood-red aliases (landing/chronicle/rules family) */
    --blood-red: #8b0000;
    --blood-red-light: #a00000;
    --blood-red-bright: #c00000;

    /* Typography */
    --font-body: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Times New Roman', Georgia, serif;

    /* Text - Warmer tones */
    --text-primary: #f0e8e4;
    --text-secondary: #b8a8a4;
    --text-muted: #8a7874; /* a11y-corrected: 4.6:1 contrast */

    /* Borders - Warmer tones with stronger blue glow */
    --border-subtle: rgba(140, 80, 100, 0.3);
    --border-glow: rgba(60, 120, 200, 0.6);

    /* Shadows - More prominent glow */
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 20px rgba(60, 120, 200, 0.35);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 999px;
}

/* ======================================
   BODY & APP CONTAINER
   ====================================== */
body {
    background: var(--bg-dark);
    font-family: var(--font-body);
    color: var(--text-primary);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

#app {
    min-height: 100vh;
    background:
        /* Pentagram overlay - Brighter visibility */
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 400 400'%3E%3Ccircle cx='200' cy='200' r='180' fill='none' stroke='%238b5cf630' stroke-width='1.5'/%3E%3Ccircle cx='200' cy='200' r='140' fill='none' stroke='%238b5cf625' stroke-width='1.5'/%3E%3Ccircle cx='200' cy='200' r='100' fill='none' stroke='%238b5cf620' stroke-width='1.5'/%3E%3Cpath d='M200 20 L285 340 L20 130 L380 130 L115 340 Z' fill='none' stroke='%238b5cf628' stroke-width='1.5'/%3E%3C/svg%3E") center center / 400px 400px,
        /* Radial gradients for depth */
        radial-gradient(ellipse at 30% 20%, rgba(92, 26, 40, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(61, 15, 22, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.03) 0%, transparent 70%),
        /* Base gradient */
        linear-gradient(180deg, #0d0508 0%, #120710 50%, #0a0305 100%);
    color: var(--text-primary);
}

/* ======================================
   HEADER STYLING
   ====================================== */
header {
    background: linear-gradient(180deg, rgba(20, 8, 12, 0.98) 0%, rgba(13, 5, 8, 0.95) 100%);
    border-bottom: 2px solid var(--border-glow);
    padding: var(--space-md) var(--space-lg);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow:
        0 2px 20px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(60, 120, 200, 0.15);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-md);
}

header h1 {
    margin: 0;
    font-family: 'Times New Roman', Georgia, serif;
    font-style: italic;
    font-size: 1.8rem;
    color: var(--text-primary);
    text-shadow:
        0 0 10px rgba(139, 92, 246, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.05em;
}

.back-btn,
a.back-btn {
    background: rgba(92, 26, 40, 0.4);
    border: 1px solid var(--border-glow);
    color: var(--text-primary);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(60, 120, 200, 0.1);
    display: inline-block;
}

.back-btn:hover,
a.back-btn:hover {
    background: rgba(92, 26, 40, 0.6);
    box-shadow: 0 0 15px rgba(60, 120, 200, 0.3);
    transform: translateX(-2px);
}

/* ======================================
   SECTION CARDS
   ====================================== */
section,
.section {
    background: var(--bg-card);
    border: 2px solid var(--border-glow);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    box-shadow:
        var(--shadow-card),
        0 0 25px rgba(60, 120, 200, 0.25),
        0 0 50px rgba(60, 120, 200, 0.1),
        inset 0 0 30px rgba(0, 0, 0, 0.3);
}

section h2,
.section h2 {
    margin: 0 0 var(--space-md) 0;
    font-family: 'Times New Roman', Georgia, serif;
    font-style: italic;
    color: var(--accent-purple);
    font-size: 1.6rem;
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
}

section h3,
.section h3 {
    margin: var(--space-lg) 0 var(--space-md) 0;
    color: #a78bfa;
    font-size: 1.2rem;
}

/* ======================================
   BUTTONS
   ====================================== */
button,
.btn,
.btn-primary {
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-purple-dark) 100%);
    border: 1px solid rgba(139, 92, 246, 0.5);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

button:hover,
.btn:hover,
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.4);
}

/* Secondary button style */
.btn-secondary {
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.4);
    color: var(--accent-purple);
}

.btn-secondary:hover {
    background: rgba(139, 92, 246, 0.3);
}

/* ======================================
   FORM INPUTS
   ====================================== */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
select,
textarea {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: all 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

/* ======================================
   SAVE FOOTER BUTTON
   ====================================== */
.save-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(13, 5, 8, 0.95) 30%);
    padding: var(--space-lg);
    display: flex;
    justify-content: center;
    z-index: 100;
}

.save-btn {
    background: linear-gradient(135deg, var(--accent-green) 0%, #16a34a 100%);
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow:
        0 4px 15px rgba(34, 197, 94, 0.3),
        0 0 20px rgba(34, 197, 94, 0.2);
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 20px rgba(34, 197, 94, 0.4),
        0 0 30px rgba(34, 197, 94, 0.3);
}

/* ======================================
   UTILITY CLASSES
   ====================================== */
.text-muted {
    color: var(--text-muted);
}

.text-secondary {
    color: var(--text-secondary);
}

.italic {
    font-style: italic;
}

/* Add bottom padding to main content for floating save button */
main {
    padding-bottom: 100px;
}