/* 🌌 Pagan Ritual Theme Styles */
:root {
    --quantum-purple: #6b46c1;
    --torch-gold: #f6ad55;
    --hearth-orange: #dd6b20;
    --sanctuary-green: #38a169;
    --cosmic-blue: #3182ce;
    --neurospark: #ffd700;
    --deep-space: #1a202c;
    --star-dust: #f7fafc;
    
    /* Sovereign Hearth specific */
    --quantum-glow: rgba(107, 70, 193, 0.3);
    --torch-glow: rgba(246, 173, 85, 0.3);
    --hearth-glow: rgba(221, 107, 32, 0.3);

    /* Elemental Color Scheme */
    --quantum: #9b59b6;
    --quantum-light: #e8daef;
    --quantum-dark: #764ba2;
    
    --fire: #e74c3c;
    --fire-light: #fadbd8;
    --fire-dark: #c0392b;
    
    --water: #3498db;
    --water-light: #d6eaf8;
    --water-dark: #2980b9;
    
    --earth: #27ae60;
    --earth-light: #d4efdf;
    --earth-dark: #229954;
    
    --air: #f39c12;
    --air-light: #fdebd0;
    --air-dark: #d68910;
    
    /* Neutral Colors */
    --background: #f8f9fa;
    --surface: #ffffff;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --border: #dee2e6;
    
    /* Shadows */
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 15px rgba(0,0,0,0.15);
    
    /* Border Radius */
    --radius: 10px;
    --radius-sm: 5px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header Styles */
.ritual-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    background: linear-gradient(135deg, var(--quantum) 0%, var(--quantum-dark) 100%);
    color: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.ritual-header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.ritual-header p {
    font-size: 1.2em;
    opacity: 0.9;
    margin-bottom: 20px;
}

.domain-tags {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.domain-tag {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.domain-tag.quantum { background: rgba(255,255,255,0.2); }
.domain-tag.fire { background: rgba(231, 76, 60, 0.8); }
.domain-tag.water { background: rgba(52, 152, 219, 0.8); }
.domain-tag.earth { background: rgba(39, 174, 96, 0.8); }

/* Intention Section */
.intention-section {
    background: var(--surface);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

.intention-section h3 {
    margin-bottom: 20px;
    text-align: center;
    color: var(--text);
}

.intention-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.intention-card {
    padding: 20px;
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.intention-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.intention-card.quantum { 
    background: var(--quantum-light);
    border-color: var(--quantum);
}
.intention-card.fire { 
    background: var(--fire-light);
    border-color: var(--fire);
}
.intention-card.water { 
    background: var(--water-light);
    border-color: var(--water);
}
.intention-card.earth { 
    background: var(--earth-light);
    border-color: var(--earth);
}

.intention-card.active {
    border-width: 4px;
    transform: scale(1.05);
}

.intention-icon {
    font-size: 2em;
    margin-bottom: 10px;
}

.intention-name {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.intention-desc {
    font-size: 0.9em;
    color: var(--text-light);
}

.active-intention {
    padding: 15px;
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: bold;
}

.active-intention.quantum { background: var(--quantum-light); color: var(--quantum-dark); }
.active-intention.fire { background: var(--fire-light); color: var(--fire-dark); }
.active-intention.water { background: var(--water-light); color: var(--water-dark); }
.active-intention.earth { background: var(--earth-light); color: var(--earth-dark); }

/* Progress & Status */
.ritual-status {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.status-item {
    background: var(--surface);
    padding: 20px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
}

.status-value {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 5px;
}

.status-item:nth-child(1) .status-value { color: var(--quantum); }
.status-item:nth-child(2) .status-value { color: var(--fire); }
.status-item:nth-child(3) .status-value { color: var(--water); }
.status-item:nth-child(4) .status-value { color: var(--earth); }

.progress-container {
    margin: 25px 0;
}

.progress-bar {
    width: 100%;
    height: 25px;
    background: var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    border-radius: 12px;
    transition: width 0.3s ease;
    text-align: center;
    color: white;
    font-size: 12px;
    line-height: 25px;
    font-weight: bold;
}

.progress-fill.quantum { background: linear-gradient(90deg, var(--quantum), var(--quantum-dark)); }
.progress-fill.fire { background: linear-gradient(90deg, var(--fire), var(--fire-dark)); }
.progress-fill.water { background: linear-gradient(90deg, var(--water), var(--water-dark)); }
.progress-fill.earth { background: linear-gradient(90deg, var(--earth), var(--earth-dark)); }

.progress-text {
    text-align: center;
    font-weight: bold;
    color: var(--text);
}

/* Controls */
.controls {
    display: flex;
    gap: 10px;
    margin: 25px 0;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9em;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-primary { background: var(--quantum); color: white; }
.btn-success { background: var(--earth); color: white; }
.btn-warning { background: var(--air); color: white; }
.btn-info { background: var(--water); color: white; }
.btn-secondary { background: var(--text-light); color: white; }
.btn-danger { background: var(--fire); color: white; }

/* Energy Cards */
.energy-cards-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 25px 0;
}

.energy-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border-left: 5px solid;
    overflow: hidden;
}

.energy-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.energy-card.quantum { border-left-color: var(--quantum); }
.energy-card.fire { border-left-color: var(--fire); }
.energy-card.water { border-left-color: var(--water); }
.energy-card.earth { border-left-color: var(--earth); }

.energy-card.completed {
    opacity: 0.7;
    background: #f8f9fa;
}

.energy-card.completed .card-essence {
    text-decoration: line-through;
}

.card-essence {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}

.card-essence input[type="checkbox"] {
    transform: scale(1.3);
    cursor: pointer;
}

.card-essence label {
    flex: 1;
    cursor: pointer;
    font-weight: 500;
}

.card-actions {
    display: flex;
    gap: 10px;
}

.btn-context, .btn-delete {
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.btn-context:hover, .btn-delete:hover {
    transform: scale(1.1);
}

.btn-context { background: var(--quantum-light); color: var(--quantum); }
.btn-delete { background: var(--fire-light); color: var(--fire); }

.card-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f8f9fa;
    border-top: 1px solid var(--border);
}

.card-expanded .card-details {
    max-height: 300px;
    padding: 20px;
}

.shiny-raised {
    background: linear-gradient(145deg, #4a5568, #2d3748);
    border-radius: 16px;
    padding: 2rem;
    margin: 1.5rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.shiny-raised::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: left 0.5s ease;
}

.shiny-raised:hover::before {
    left: 100%;
}

.task-details {
    width: 100%;
    min-height: 100px;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    resize: vertical;
}

.energy-card {
    background: linear-gradient(145deg, #2d3748, #4a5568);
    border-radius: 16px;
    padding: 0;
    margin: 1rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.energy-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.05),
        transparent
    );
    transition: left 0.7s ease;
}

.energy-card:hover::before {
    left: 100%;
}

.energy-card.quantum {
    border-left: 4px solid var(--quantum-purple);
    box-shadow: 
        0 8px 32px var(--quantum-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.energy-card.fire {
    border-left: 4px solid var(--hearth-orange);
    box-shadow: 
        0 8px 32px var(--hearth-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.energy-card.water {
    border-left: 4px solid var(--cosmic-blue);
    box-shadow: 
        0 8px 32px rgba(49, 130, 206, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.energy-card.earth {
    border-left: 4px solid var(--sanctuary-green);
    box-shadow: 
        0 8px 32px rgba(56, 161, 105, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Enhanced progress bars */
.progress-fill.quantum {
    background: linear-gradient(90deg, var(--quantum-purple), #805ad5);
    box-shadow: 0 0 20px var(--quantum-glow);
}

.progress-fill.fire {
    background: linear-gradient(90deg, var(--hearth-orange), #ed8936);
    box-shadow: 0 0 20px var(--hearth-glow);
}

/* Quantum glow effects */
.quantum-glow {
    box-shadow: 0 0 30px var(--quantum-glow);
}

.torch-glow {
    box-shadow: 0 0 30px var(--torch-glow);
}

/* Council entity themes */
.entity-theme.chancellor { border-color: var(--cosmic-blue); }
.entity-theme.seer { border-color: var(--quantum-purple); }
.entity-theme.skald { border-color: var(--torch-gold); }
.entity-theme.hearth-keeper { border-color: var(--hearth-orange); }
.entity-theme.archivist { border-color: var(--sanctuary-green); }

/* Ritual animations */
@keyframes ritualPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.ritual-active {
    animation: ritualPulse 2s ease-in-out infinite;
}

/* Quantum continuity visualizer */
.continuity-beam {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neurospark), transparent);
    animation: beamTravel 3s linear infinite;
}

@keyframes beamTravel {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Enhanced form elements matching main site */
.sovereign-input {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--star-dust);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.sovereign-input:focus {
    outline: none;
    border-color: var(--torch-gold);
    box-shadow: 0 0 0 3px rgba(246, 173, 85, 0.2);
}

/* Export Section */
.export-section {
    background: var(--surface);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 25px 0;
}

.export-section h3 {
    margin-bottom: 15px;
    color: var(--quantum);
}

.export-section textarea {
    width: 100%;
    height: 300px;
    padding: 15px;
    border: 2px solid var(--quantum);
    border-radius: var(--radius-sm);
    font-family: monospace;
    resize: vertical;
    margin-bottom: 15px;
}

.export-controls {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--surface);
    padding: 30px;
    border-radius: var(--radius);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal h2 {
    margin-bottom: 20px;
    color: var(--quantum);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.energy-card .card-essence {
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.energy-card .card-essence:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Focus management for ADHD-friendly interaction */
.energy-card:focus-within {
    box-shadow: 
        0 0 0 3px var(--torch-glow),
        0 8px 32px rgba(0, 0, 0, 0.3);
}

/* High contrast support */
@media (prefers-contrast: high) {
    .energy-card {
        border-width: 2px;
        box-shadow: none;
    }
    
    .shiny-raised {
        box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .shiny-raised::before,
    .energy-card::before,
    .continuity-beam {
        display: none;
    }
    
    .energy-card {
        transition: none;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .intention-grid {
        grid-template-columns: 1fr;
    }
    
    .ritual-status {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .controls {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}
