/* ============================================
   ELEMENT SYSTEM STYLES — Chinese Astrology
   ============================================ */

/* --- Hero Banner --- */
.element-hero {
    position: relative;
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    transition: background-image 0.5s ease;
    overflow: hidden;
}

/* Gradient fallbacks for each element */
.element-hero.wood { background: linear-gradient(135deg, #2d5a3f 0%, #5a8c6a 100%); }
.element-hero.fire { background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%); }
.element-hero.earth { background: linear-gradient(135deg, #8b7355 0%, #c4a77d 100%); }
.element-hero.metal { background: linear-gradient(135deg, #7f8c8d 0%, #bdc3c7 100%); }
.element-hero.water { background: linear-gradient(135deg, #1a5276 0%, #2980b9 100%); }

.hero-overlay {
    background: rgba(0,0,0,0.4);
    padding: 2.5rem;
    border-radius: 12px;
    backdrop-filter: blur(4px);
    max-width: 700px;
}

.element-title {
    font-size: 2.8rem;
    color: #fff;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.element-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.9);
    max-width: 550px;
    margin: 0 auto 1rem;
}

.element-meta {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    flex-wrap: wrap;
}

.meta-badge {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    color: #fff;
    font-size: 0.8rem;
    backdrop-filter: blur(4px);
}

/* Theme Toggle */
.theme-toggle {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.theme-toggle:hover {
    background: rgba(255,255,255,0.35);
    transform: scale(1.1);
}

/* --- Traits Grid --- */
.element-traits {
    padding: 2.5rem 1rem;
    max-width: 900px;
    margin: 0 auto;
}

.traits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.2rem;
    margin-top: 1.2rem;
}

.trait-card {
    background: var(--card-bg, #f8f9fa);
    border: 1px solid var(--border-color, #e9ecef);
    border-radius: 12px;
    padding: 1.2rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.trait-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.trait-icon {
    font-size: 1.4rem;
    color: var(--accent-color, #ff6b6b);
    margin-right: 0.4rem;
}

/* --- Animals Mini Grid --- */
.element-animals {
    padding: 2rem 1rem;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.animal-mini-grid {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.animal-mini-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}

.animal-mini-card:hover {
    transform: scale(1.08);
}

.animal-mini-card img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color, #ddd);
    margin-bottom: 0.5rem;
}

.animal-mini-card span {
    font-weight: 600;
    font-size: 0.9rem;
}

/* --- Layers Grid (Tier System) --- */
.element-layers {
    padding: 2.5rem 1rem;
    max-width: 1100px;
    margin: 0 auto;
}

.tier-legend {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

.tier-legend span { margin: 0 0.8rem; }
.legend-free { color: #27ae60; }
.legend-preview { color: #f39c12; }
.legend-premium { color: #e74c3c; }

.layers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.2rem;
}

.layer-card {
    background: var(--card-bg, #fff);
    border: 2px solid var(--border-color, #e9ecef);
    border-radius: 14px;
    padding: 1.2rem;
    position: relative;
    transition: all 0.3s ease;
}

.layer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.1);
}

.layer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.layer-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-muted, #adb5bd);
}

.lock-icon { font-size: 1.1rem; }

.layer-card h3 {
    font-size: 1rem;
    margin-bottom: 0.6rem;
}

.layer-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}

.free-badge { background: #d4edda; color: #155724; }
.preview-badge { background: #fff3cd; color: #856404; }
.premium-badge { background: #f8d7da; color: #721c24; }

.layer-btn {
    display: block;
    text-align: center;
    padding: 0.6rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    background: var(--primary-color, #c41e3a);
    color: #fff;
    font-size: 0.9rem;
}

.layer-btn:hover {
    filter: brightness(1.15);
}

.locked-btn {
    background: #6c757d;
    cursor: not-allowed;
}

/* --- Section Headings --- */
.section-heading {
    text-align: center;
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    color: var(--text-color, #333);
}

.section-subheading {
    text-align: center;
    color: var(--text-muted, #666);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .trait-card, .layer-card {
        background: var(--card-bg-dark, #2d3436);
        border-color: var(--border-color-dark, #636e72);
    }
    .section-heading { color: var(--text-color-dark, #dfe6e9); }
    .animal-mini-card span { color: var(--text-color-dark, #dfe6e9); }
}
