/* The Kirrin Chronicles - Custom Styling
   Themed CSS for a paladin's digital chronicles
   Built for storytelling, optimized for immersion */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=EB+Garamond:ital,wght@0,400;0,500;1,400&display=swap');

:root {
    --primary-gold: #FFD700;
    --dark-gold: #B8860B;
    --parchment: #F4F1E8;
    --dark-parchment: #E8E2D5;
    --ink-black: #2C1810;
    --silver: #C0C0C0;
    --blood-red: #8B0000;
    --shadow: rgba(44, 24, 16, 0.3);
}

/* Global Styling - The Foundation */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'EB Garamond', serif;
    background: linear-gradient(135deg, var(--parchment) 0%, var(--dark-parchment) 100%);
    color: var(--ink-black);
    line-height: 1.6;
}

/* Typography - Words of Power */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Cinzel', serif;
    color: var(--ink-black);
}

/* Links - Paths to Other Realms */
a {
    color: var(--dark-gold);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-gold);
    text-shadow: 0 0 5px var(--primary-gold);
}

/* Buttons - Calls to Action */
.btn, button {
    background: linear-gradient(45deg, var(--dark-gold), var(--primary-gold));
    color: var(--ink-black);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--shadow);
}

.btn:hover, button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow);
    background: linear-gradient(45deg, var(--primary-gold), white);
}

/* Cards - Containers of Wisdom */
.card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px var(--shadow);
    border: 2px solid var(--silver);
    margin-bottom: 1.5rem;
}

.card h3 {
    border-bottom: 2px solid var(--dark-gold);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-gold { color: var(--primary-gold); }
.text-silver { color: var(--silver); }
.text-shadow { text-shadow: 2px 2px 4px var(--shadow); }

.bg-dark { background: var(--ink-black); color: var(--primary-gold); }
.bg-parchment { background: var(--parchment); }

.glow {
    animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 5px var(--primary-gold); }
    to { text-shadow: 0 0 15px var(--primary-gold); }
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        font-size: 0.9rem;
    }
    
    .btn, button {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .card {
        padding: 1rem;
    }
}

/* Custom Elements for Future Pages */
.chronicle-entry {
    background: var(--parchment);
    border: 1px solid var(--dark-gold);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    transition: transform 0.3s ease;
}

.chronicle-entry:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--shadow);
}

.cleaver-pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* Form Styling */
input, textarea, select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--silver);
    border-radius: 8px;
    font-family: 'EB Garamond', serif;
    background: var(--parchment);
    color: var(--ink-black);
    margin-bottom: 1rem;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--dark-gold);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--dark-gold);
    border-radius: 50%;
    border-top-color: var(--primary-gold);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}