@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700;900&family=Outfit:wght@200;400;600;800&display=swap');

:root { 
    --gold: #f59e0b; 
    --mystic: #8b5cf6; 
    --wood: #10b981;
    --fire: #ef4444;
    --earth: #b45309;
    --metal: #e5e7eb;
    --water: #3b82f6;
}

body { 
    font-family: 'Outfit', sans-serif; 
    background: #020617; 
    color: #e2e8f0; 
    overflow-x: hidden; 
    position: relative;
}

h1, h2, .font-serif, .codex-title { 
    font-family: 'Cinzel', serif; 
}

.stars { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    z-index: -2; 
    background: radial-gradient(ellipse at bottom, #1e1b4b 0%, #020617 100%);
}

.twinkling {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.5;
    background: transparent;
    animation: twinkle 4s infinite;
    background-image: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 3px 3px;
}

@keyframes twinkle {
    0% { opacity: 0.3; }
    50% { opacity: 0.6; }
    100% { opacity: 0.3; }
}

.glass-panel {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 35px -10px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
}

.glass-panel:hover {
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 25px 40px -12px rgba(245, 158, 11, 0.15);
}

.element-bar { 
    transition: width 1.2s cubic-bezier(0.23, 1, 0.32, 1); 
}

.moon-ring { 
    animation: rotate 30s linear infinite; 
}

@keyframes rotate { 
    from { transform: rotate(0deg); } 
    to { transform: rotate(360deg); } 
}

.spinner {
    border: 3px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    border-top: 3px solid #f59e0b;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.lucky-hour-badge {
    animation: pulse 2s infinite;
    transition: all 0.3s ease;
}

.lucky-hour-badge:hover {
    transform: scale(1.02);
    border-color: #f59e0b !important;
}

@keyframes pulse {
    0% { opacity: 0.9; box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.2); }
    50% { opacity: 1; box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1); }
    100% { opacity: 0.9; box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.2); }
}

input:focus, select:focus {
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.1);
    outline: none;
}

.tooltip {
    position: relative;
}

.tooltip:hover:after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #e2e8f0;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 10;
    border: 1px solid rgba(245, 158, 11, 0.3);
    margin-bottom: 8px;
    pointer-events: none;
}

.fade-in {
    animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.prophecy-tab {
    transition: all 0.2s ease;
    cursor: pointer;
}

.prophecy-tab i {
    pointer-events: none;
}

.prophecy-tab:hover {
    background: rgba(245, 158, 11, 0.1);
}

.prophecy-tab.active {
    background: rgba(245, 158, 11, 0.2);
    border-color: #f59e0b !important;
    color: #f59e0b !important;
}

.star-rating {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.star {
    font-size: 24px;
    color: #334155;
    transition: all 0.3s ease;
}

.star.filled {
    color: #f59e0b;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #f59e0b;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d97706;
}

.codex-quote-box {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(245, 158, 11, 0.15) 100%);
    border-left: 4px solid #f59e0b;
    border-right: 4px solid #8b5cf6;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    position: relative;
    backdrop-filter: blur(8px);
    max-width: 700px;
    margin: 1rem auto 0.5rem auto;
}

.codex-quote-text {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    color: #fcd34d;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
    line-height: 1.5;
    font-style: italic;
    letter-spacing: 0.5px;
}

.codex-attribution {
    font-size: 0.6rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #a78bfa;
    margin-top: 0.5rem;
}

.logo-image {
    width: 200px;
    height: 200px;
    margin: 1.5rem auto;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(245,158,11,0.2) 0%, rgba(139,92,246,0.2) 100%);
    border: 3px solid rgba(245,158,11,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(245,158,11,0.3);
}

.logo-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comfort-quote-box {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    border-radius: 8px;
    padding: 1.25rem;
    border-bottom: 2px solid #f59e0b;
    border-top: 2px solid #8b5cf6;
}

.comfort-quote-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #e2e8f0;
    font-style: italic;
}

.oracle-counsel-box {
    min-height: 200px;
    padding: 2rem !important;
}

.oracle-counsel-text {
    font-size: 1.1rem;
    line-height: 1.7;
}

.celestial-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #8b5cf6;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin: 0.5rem 0;
}

.celestial-divider i {
    color: #f59e0b;
    font-size: 0.6rem;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f59e0b'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.5rem;
    padding-right: 2.5rem;
}

select option {
    background-color: #0f172a;
    color: #e2e8f0;
    padding: 0.5rem;
}

@media (max-width: 768px) {
    .prophecy-tab {
        padding: 12px 8px !important;
        font-size: 14px !important;
        flex: 1 1 auto;
        justify-content: center;
    }
    
    .grid-cols-3.gap-2 {
        gap: 6px;
    }
    
    select, input {
        font-size: 16px !important;
    }
}