/* ============================================
   THEORIES LISTING PAGE STYLES
   MobLand.Pro
   ============================================ */

/* CSS Variables */
:root {
    --theories-hero-svg: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 5 L35 20 L50 20 L38 30 L43 45 L30 35 L17 45 L22 30 L10 20 L25 20 Z' stroke='%23C9A227' stroke-width='0.5' fill='none' opacity='0.08'/%3E%3C/svg%3E");
    --theories-hero-accent: rgba(201, 162, 39, 0.03);
}

[data-theme="light"] {
    --theories-hero-svg: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 5 L35 20 L50 20 L38 30 L43 45 L30 35 L17 45 L22 30 L10 20 L25 20 Z' stroke='%230D0D0D' stroke-width='0.5' fill='none' opacity='0.06'/%3E%3C/svg%3E");
    --theories-hero-accent: rgba(13, 13, 13, 0.02);
}

/* ============================================
   THEORIES HERO SECTION
   ============================================ */
.theories-hero {
    padding: 140px 40px 60px;
    text-align: center;
    background:
        var(--theories-hero-svg),
        linear-gradient(180deg, var(--theories-hero-accent) 0%, transparent 100%);
    border-bottom: 1px solid var(--border-color);
}

.theories-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.theories-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    margin-bottom: 20px;
    font-family: var(--font-headline);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.theories-badge svg {
    width: 16px;
    height: 16px;
    stroke: var(--harrigan-gold);
}

.theories-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    color: var(--text-primary);
    margin-bottom: 20px;
    letter-spacing: 4px;
}

.theories-hero-description {
    font-family: var(--font-body);
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto 30px;
}

/* ============================================
   FILTER TABS
   ============================================ */
.theories-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.theories-filter-btn {
    padding: 10px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-family: var(--font-headline);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 1px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.theories-filter-btn:hover {
    border-color: var(--harrigan-gold);
    color: var(--harrigan-gold);
}

.theories-filter-btn.active {
    background: var(--harrigan-gold);
    border-color: var(--harrigan-gold);
    color: var(--midnight-black);
}

/* ============================================
   THEORIES LISTING
   ============================================ */
.theories-listing {
    padding: 80px 40px;
    background: var(--bg-primary);
}

.theories-container {
    max-width: 1200px;
    margin: 0 auto;
}

.theories-listing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.theories-count {
    font-family: var(--font-headline);
    font-size: 0.85rem;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.theories-count span {
    color: var(--harrigan-gold);
}

.theories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* ============================================
   THEORY CARD
   ============================================ */
.theories-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.theories-card:hover {
    border-color: var(--harrigan-gold);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Card Header */
.theories-card-header {
    position: relative;
    padding: 30px 25px 20px;
    background: linear-gradient(135deg, var(--theories-hero-accent) 0%, transparent 100%);
    border-bottom: 1px solid var(--border-color);
}

.theories-card-icon {
    width: 48px;
    height: 48px;
    background: var(--harrigan-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.theories-card-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--midnight-black);
    fill: none;
}

.theories-card-type {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 4px 12px;
    border-radius: 15px;
    font-family: var(--font-headline);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.theories-card-type.theory {
    background: rgba(201, 162, 39, 0.15);
    color: var(--harrigan-gold);
}

.theories-card-type.analysis {
    background: rgba(100, 149, 237, 0.15);
    color: #6495ed;
}

.theories-card-type.prediction {
    background: rgba(147, 112, 219, 0.15);
    color: #9370db;
}

.theories-card-type.mystery {
    background: rgba(220, 20, 60, 0.15);
    color: #dc143c;
}

/* Card Content */
.theories-card-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.theories-card-title {
    font-family: var(--font-headline);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
}

.theories-card-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.theories-card-title a:hover {
    color: var(--harrigan-gold);
}

.theories-card-excerpt {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

/* Card Meta */
.theories-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.theories-card-stats {
    display: flex;
    gap: 15px;
}

.theories-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-headline);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.theories-stat svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    opacity: 0.7;
}

.theories-stat span {
    color: var(--text-primary);
    font-weight: 600;
}

.theories-card-date {
    font-family: var(--font-headline);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ============================================
   FEATURED THEORY
   ============================================ */
.theories-featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--bg-secondary);
    border: 2px solid var(--harrigan-gold);
    border-radius: 8px;
    overflow: hidden;
}

.theories-featured .theories-card-header {
    padding: 50px 30px;
    border-bottom: none;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.theories-featured .theories-card-icon {
    width: 64px;
    height: 64px;
}

.theories-featured .theories-card-icon svg {
    width: 32px;
    height: 32px;
}

.theories-featured-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--harrigan-gold);
    color: var(--midnight-black);
    border-radius: 4px;
    font-family: var(--font-headline);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.theories-featured-label svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
}

.theories-featured .theories-card-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.theories-featured .theories-card-title {
    font-size: 1.5rem;
}

.theories-featured .theories-card-excerpt {
    font-size: 1rem;
}

/* ============================================
   SPOILER WARNING BADGE
   ============================================ */
.theories-spoiler-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(220, 20, 60, 0.15);
    border: 1px solid rgba(220, 20, 60, 0.3);
    border-radius: 4px;
    font-family: var(--font-headline);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #dc143c;
    margin-bottom: 12px;
}

.theories-spoiler-badge svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
}

/* ============================================
   CONFIDENCE METER
   ============================================ */
.theories-confidence {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.theories-confidence-label {
    font-family: var(--font-headline);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.theories-confidence-bar {
    flex: 1;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.theories-confidence-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.theories-confidence-fill.high {
    width: 85%;
    background: linear-gradient(90deg, var(--harrigan-gold), #d4af37);
}

.theories-confidence-fill.medium {
    width: 60%;
    background: linear-gradient(90deg, #6495ed, #87ceeb);
}

.theories-confidence-fill.low {
    width: 35%;
    background: linear-gradient(90deg, #9370db, #dda0dd);
}

.theories-confidence-value {
    font-family: var(--font-headline);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 32px;
    text-align: right;
}

/* ============================================
   TAGS
   ============================================ */
.theories-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.theories-tag {
    padding: 4px 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-headline);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.theories-tag:hover {
    border-color: var(--harrigan-gold);
    color: var(--harrigan-gold);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.theories-empty-state {
    text-align: center;
    padding: 80px 20px;
    grid-column: 1 / -1;
}

.theories-empty-state svg {
    width: 80px;
    height: 80px;
    stroke: var(--border-color);
    margin-bottom: 25px;
}

.theories-empty-state h3 {
    font-family: var(--font-headline);
    font-size: 1.5rem;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.theories-empty-state p {
    font-family: var(--font-body);
    color: var(--text-secondary);
    margin-bottom: 25px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .theories-featured {
        grid-template-columns: 1fr;
    }

    .theories-featured .theories-card-header {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .theories-hero {
        padding: 120px 20px 40px;
    }

    .theories-hero h1 {
        font-size: 2.5rem;
    }

    .theories-listing {
        padding: 60px 20px;
    }

    .theories-grid {
        grid-template-columns: 1fr;
    }

    .theories-filters {
        gap: 8px;
    }

    .theories-filter-btn {
        padding: 8px 15px;
        font-size: 0.75rem;
    }
}

/* ============================================
   LIGHT THEME OVERRIDES
   ============================================ */
[data-theme="light"] .theories-card {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .theories-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .theories-featured {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ============================================
   FEATURED IMAGES IN CARDS
   ============================================ */
.theories-card-image {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
}

.theories-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.theories-card:hover .theories-card-image img,
.theories-featured:hover .theories-card-image img {
    transform: scale(1.05);
}

/* Regular cards with thumbnail */
.theories-card.has-thumbnail .theories-card-header {
    position: relative;
    min-height: 180px;
    padding: 0;
    background: var(--midnight-black);
}

.theories-card.has-thumbnail .theories-card-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.6) 100%);
    pointer-events: none;
    z-index: 1;
}

.theories-card.has-thumbnail .theories-card-type {
    z-index: 2;
}

.theories-card.has-thumbnail .theories-card-icon {
    display: none;
}

/* Featured card with thumbnail */
.theories-featured.has-thumbnail .theories-card-header {
    position: relative;
    padding: 0;
    background: var(--midnight-black);
    min-height: 300px;
}

.theories-featured.has-thumbnail .theories-card-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.5) 100%);
    pointer-events: none;
    z-index: 1;
}

.theories-featured.has-thumbnail .theories-featured-label {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 2;
    background: var(--harrigan-gold);
    color: var(--midnight-black);
}

.theories-featured.has-thumbnail .theories-card-icon {
    display: none;
}

/* Responsive adjustments for thumbnails */
@media (max-width: 768px) {
    .theories-featured.has-thumbnail .theories-card-header {
        min-height: 200px;
    }
    
    .theories-card.has-thumbnail .theories-card-header {
        min-height: 150px;
    }
}
