/*
Theme Name: Red Room Digital
Theme URI: https://redroomdigital.com
Author: Red Room Digital
Author URI: https://redroomdigital.com
Description: A modern AI character chatbot platform theme with stunning visuals and seamless user experience. Features character cards, detailed profiles, and chat integration.
Version: 1.0.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: red-room-digital
Tags: ai, chatbot, characters, modern, dark-mode, custom-colors, featured-images

Red Room Digital - Where AI Characters Come to Life
*/

/* ============================================
   CSS CUSTOM PROPERTIES & DESIGN TOKENS
   ============================================ */
:root {
    /* Primary Colors - Deep crimson to black gradient palette */
    --rrd-primary: #dc2626;
    --rrd-primary-dark: #991b1b;
    --rrd-primary-light: #ef4444;
    --rrd-primary-glow: rgba(220, 38, 38, 0.4);
    
    /* Background Colors */
    --rrd-bg-darkest: #0a0a0b;
    --rrd-bg-dark: #111113;
    --rrd-bg-medium: #18181b;
    --rrd-bg-light: #27272a;
    --rrd-bg-card: #1c1c1f;
    
    /* Text Colors */
    --rrd-text-primary: #fafafa;
    --rrd-text-secondary: #a1a1aa;
    --rrd-text-muted: #71717a;
    --rrd-text-accent: #f87171;
    
    /* Accent Colors */
    --rrd-accent-cyan: #22d3ee;
    --rrd-accent-purple: #a855f7;
    --rrd-accent-emerald: #34d399;
    --rrd-accent-amber: #fbbf24;
    
    /* Borders & Shadows */
    --rrd-border-subtle: rgba(255, 255, 255, 0.06);
    --rrd-border-medium: rgba(255, 255, 255, 0.1);
    --rrd-border-strong: rgba(255, 255, 255, 0.15);
    --rrd-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --rrd-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --rrd-shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --rrd-shadow-glow: 0 0 40px var(--rrd-primary-glow);
    
    /* Typography */
    --rrd-font-display: 'Orbitron', 'Rajdhani', sans-serif;
    --rrd-font-heading: 'Rajdhani', 'Orbitron', sans-serif;
    --rrd-font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
    --rrd-font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Spacing Scale */
    --rrd-space-xs: 0.25rem;
    --rrd-space-sm: 0.5rem;
    --rrd-space-md: 1rem;
    --rrd-space-lg: 1.5rem;
    --rrd-space-xl: 2rem;
    --rrd-space-2xl: 3rem;
    --rrd-space-3xl: 4rem;
    
    /* Border Radius */
    --rrd-radius-sm: 6px;
    --rrd-radius-md: 12px;
    --rrd-radius-lg: 16px;
    --rrd-radius-xl: 24px;
    --rrd-radius-full: 9999px;
    
    /* Transitions */
    --rrd-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --rrd-transition-medium: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --rrd-transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Layout */
    --rrd-container-max: 1400px;
    --rrd-sidebar-width: 280px;
    --rrd-header-height: 72px;
}

/* ============================================
   CSS RESET & BASE STYLES
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--rrd-font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--rrd-text-primary);
    background-color: var(--rrd-bg-darkest);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse 80% 50% at 20% -20%, rgba(220, 38, 38, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(168, 85, 247, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 40% 60% at 0% 50%, rgba(34, 211, 238, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Grid Overlay Effect */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: -1;
}

a {
    color: var(--rrd-primary-light);
    text-decoration: none;
    transition: color var(--rrd-transition-fast);
}

a:hover {
    color: var(--rrd-text-accent);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul, ol {
    list-style: none;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--rrd-font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--rrd-text-primary);
    letter-spacing: 0.02em;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-family: var(--rrd-font-display);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: var(--rrd-space-md);
    color: var(--rrd-text-secondary);
}

/* ============================================
   LAYOUT CONTAINERS
   ============================================ */
.rrd-container {
    width: 100%;
    max-width: var(--rrd-container-max);
    margin: 0 auto;
    padding: 0 var(--rrd-space-lg);
}

.rrd-main-layout {
    display: grid;
    grid-template-columns: var(--rrd-sidebar-width) 1fr;
    min-height: 100vh;
}

@media (max-width: 1024px) {
    .rrd-main-layout {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   HEADER
   ============================================ */
.rrd-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--rrd-header-height);
    background: rgba(10, 10, 11, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--rrd-border-subtle);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 var(--rrd-space-xl);
}

.rrd-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: var(--rrd-container-max);
    margin: 0 auto;
}

.rrd-logo {
    display: flex;
    align-items: center;
    gap: var(--rrd-space-md);
}

.rrd-logo__icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--rrd-primary) 0%, var(--rrd-primary-dark) 100%);
    border-radius: var(--rrd-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--rrd-shadow-glow);
    position: relative;
    overflow: hidden;
}

.rrd-logo__icon::before {
    content: '';
    position: absolute;
    inset: 2px;
    background: var(--rrd-bg-dark);
    border-radius: calc(var(--rrd-radius-md) - 2px);
}

.rrd-logo__icon svg {
    position: relative;
    z-index: 1;
    width: 24px;
    height: 24px;
    fill: var(--rrd-primary-light);
}

.rrd-logo__text {
    font-family: var(--rrd-font-display);
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    background: linear-gradient(135deg, var(--rrd-text-primary) 0%, var(--rrd-primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Header Navigation */
.rrd-nav {
    display: flex;
    align-items: center;
    gap: var(--rrd-space-sm);
}

.rrd-nav__link {
    padding: var(--rrd-space-sm) var(--rrd-space-md);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--rrd-text-secondary);
    border-radius: var(--rrd-radius-sm);
    transition: all var(--rrd-transition-fast);
    position: relative;
}

.rrd-nav__link:hover,
.rrd-nav__link--active {
    color: var(--rrd-text-primary);
    background: var(--rrd-bg-light);
}

.rrd-nav__link--active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--rrd-primary);
    border-radius: var(--rrd-radius-full);
}

/* Header Search */
.rrd-search {
    position: relative;
    width: 280px;
}

.rrd-search__input {
    width: 100%;
    padding: var(--rrd-space-sm) var(--rrd-space-md);
    padding-left: 42px;
    font-size: 0.875rem;
    color: var(--rrd-text-primary);
    background: var(--rrd-bg-medium);
    border: 1px solid var(--rrd-border-subtle);
    border-radius: var(--rrd-radius-full);
    outline: none;
    transition: all var(--rrd-transition-fast);
}

.rrd-search__input::placeholder {
    color: var(--rrd-text-muted);
}

.rrd-search__input:focus {
    border-color: var(--rrd-primary);
    box-shadow: 0 0 0 3px var(--rrd-primary-glow);
}

.rrd-search__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--rrd-text-muted);
    pointer-events: none;
}

/* ============================================
   SIDEBAR
   ============================================ */
.rrd-sidebar {
    position: fixed;
    top: var(--rrd-header-height);
    left: 0;
    width: var(--rrd-sidebar-width);
    height: calc(100vh - var(--rrd-header-height));
    background: var(--rrd-bg-dark);
    border-right: 1px solid var(--rrd-border-subtle);
    padding: var(--rrd-space-xl) var(--rrd-space-lg);
    overflow-y: auto;
    z-index: 100;
}

.rrd-sidebar__section {
    margin-bottom: var(--rrd-space-2xl);
}

.rrd-sidebar__title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--rrd-text-muted);
    margin-bottom: var(--rrd-space-md);
    padding-left: var(--rrd-space-sm);
}

.rrd-sidebar__menu {
    display: flex;
    flex-direction: column;
    gap: var(--rrd-space-xs);
}

.rrd-sidebar__link {
    display: flex;
    align-items: center;
    gap: var(--rrd-space-md);
    padding: var(--rrd-space-sm) var(--rrd-space-md);
    font-size: 0.9375rem;
    color: var(--rrd-text-secondary);
    border-radius: var(--rrd-radius-md);
    transition: all var(--rrd-transition-fast);
}

.rrd-sidebar__link:hover {
    color: var(--rrd-text-primary);
    background: var(--rrd-bg-light);
}

.rrd-sidebar__link--active {
    color: var(--rrd-text-primary);
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.15) 0%, rgba(220, 38, 38, 0.05) 100%);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.rrd-sidebar__icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.rrd-sidebar__link:hover .rrd-sidebar__icon,
.rrd-sidebar__link--active .rrd-sidebar__icon {
    opacity: 1;
}

/* Category Tags in Sidebar */
.rrd-category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--rrd-space-sm);
}

.rrd-category-tag {
    padding: var(--rrd-space-xs) var(--rrd-space-md);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--rrd-text-secondary);
    background: var(--rrd-bg-medium);
    border: 1px solid var(--rrd-border-subtle);
    border-radius: var(--rrd-radius-full);
    transition: all var(--rrd-transition-fast);
    cursor: pointer;
}

.rrd-category-tag:hover,
.rrd-category-tag--active {
    color: var(--rrd-primary-light);
    border-color: var(--rrd-primary);
    background: rgba(220, 38, 38, 0.1);
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
.rrd-main {
    margin-left: var(--rrd-sidebar-width);
    margin-top: var(--rrd-header-height);
    padding: var(--rrd-space-2xl);
    min-height: calc(100vh - var(--rrd-header-height));
}

@media (max-width: 1024px) {
    .rrd-sidebar {
        transform: translateX(-100%);
        transition: transform var(--rrd-transition-medium);
    }
    
    .rrd-sidebar--open {
        transform: translateX(0);
    }
    
    .rrd-main {
        margin-left: 0;
    }
}

/* Page Header */
.rrd-page-header {
    margin-bottom: var(--rrd-space-2xl);
}

.rrd-page-header__title {
    margin-bottom: var(--rrd-space-sm);
}

.rrd-page-header__subtitle {
    font-size: 1.125rem;
    color: var(--rrd-text-muted);
}

/* ============================================
   CHARACTER GRID
   ============================================ */
.rrd-character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--rrd-space-xl);
}

@media (min-width: 1400px) {
    .rrd-character-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================
   CHARACTER CARD
   ============================================ */
.rrd-character-card {
    position: relative;
    background: var(--rrd-bg-card);
    border: 1px solid var(--rrd-border-subtle);
    border-radius: var(--rrd-radius-lg);
    overflow: hidden;
    transition: all var(--rrd-transition-medium);
    cursor: pointer;
}

.rrd-character-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--rrd-transition-medium);
    pointer-events: none;
    z-index: 1;
}

.rrd-character-card:hover {
    transform: translateY(-4px);
    border-color: var(--rrd-primary);
    box-shadow: var(--rrd-shadow-lg), var(--rrd-shadow-glow);
}

.rrd-character-card:hover::before {
    opacity: 1;
}

/* Card Image */
.rrd-character-card__image {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
}

.rrd-character-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--rrd-transition-slow);
}

.rrd-character-card:hover .rrd-character-card__image img {
    transform: scale(1.05);
}

/* Image Gradient Overlay */
.rrd-character-card__image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        var(--rrd-bg-card) 0%,
        rgba(28, 28, 31, 0.8) 30%,
        transparent 60%
    );
    pointer-events: none;
}

/* Status Badge */
.rrd-character-card__status {
    position: absolute;
    top: var(--rrd-space-md);
    right: var(--rrd-space-md);
    display: flex;
    align-items: center;
    gap: var(--rrd-space-xs);
    padding: var(--rrd-space-xs) var(--rrd-space-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(10, 10, 11, 0.8);
    backdrop-filter: blur(10px);
    border-radius: var(--rrd-radius-full);
    z-index: 2;
}

.rrd-character-card__status--online {
    color: var(--rrd-accent-emerald);
}

.rrd-character-card__status--online::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--rrd-accent-emerald);
    border-radius: 50%;
    animation: pulse-online 2s ease-in-out infinite;
}

@keyframes pulse-online {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

/* Category Badge */
.rrd-character-card__category {
    position: absolute;
    top: var(--rrd-space-md);
    left: var(--rrd-space-md);
    padding: var(--rrd-space-xs) var(--rrd-space-sm);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--rrd-radius-sm);
    z-index: 2;
}

.rrd-character-card__category--fantasy {
    background: linear-gradient(135deg, #7c3aed 0%, #4c1d95 100%);
    color: #fff;
}

.rrd-character-card__category--scifi {
    background: linear-gradient(135deg, #0891b2 0%, #164e63 100%);
    color: #fff;
}

.rrd-character-card__category--anime {
    background: linear-gradient(135deg, #db2777 0%, #831843 100%);
    color: #fff;
}

.rrd-character-card__category--historical {
    background: linear-gradient(135deg, #d97706 0%, #78350f 100%);
    color: #fff;
}

.rrd-character-card__category--humor {
    background: linear-gradient(135deg, #16a34a 0%, #14532d 100%);
    color: #fff;
}

.rrd-character-card__category--original {
    background: linear-gradient(135deg, var(--rrd-primary) 0%, var(--rrd-primary-dark) 100%);
    color: #fff;
}

/* Card Content */
.rrd-character-card__content {
    position: relative;
    padding: var(--rrd-space-lg);
    margin-top: -60px;
    z-index: 2;
}

.rrd-character-card__name {
    font-family: var(--rrd-font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--rrd-text-primary);
    margin-bottom: var(--rrd-space-xs);
    transition: color var(--rrd-transition-fast);
}

.rrd-character-card:hover .rrd-character-card__name {
    color: var(--rrd-primary-light);
}

.rrd-character-card__description {
    font-size: 0.875rem;
    color: var(--rrd-text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: var(--rrd-space-md);
}

/* Card Meta */
.rrd-character-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--rrd-space-md);
    border-top: 1px solid var(--rrd-border-subtle);
}

.rrd-character-card__stats {
    display: flex;
    align-items: center;
    gap: var(--rrd-space-md);
}

.rrd-character-card__stat {
    display: flex;
    align-items: center;
    gap: var(--rrd-space-xs);
    font-size: 0.8125rem;
    color: var(--rrd-text-muted);
}

.rrd-character-card__stat svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

/* Chat Button */
.rrd-character-card__chat-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--rrd-primary);
    border-radius: var(--rrd-radius-md);
    color: #fff;
    transition: all var(--rrd-transition-fast);
}

.rrd-character-card__chat-btn:hover {
    background: var(--rrd-primary-light);
    transform: scale(1.1);
}

.rrd-character-card__chat-btn svg {
    width: 18px;
    height: 18px;
}

/* ============================================
   SINGLE CHARACTER PAGE
   ============================================ */
.rrd-character-single {
    max-width: 1200px;
    margin: 0 auto;
}

/* Character Hero Section */
.rrd-character-hero {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: var(--rrd-space-2xl);
    margin-bottom: var(--rrd-space-3xl);
}

@media (max-width: 900px) {
    .rrd-character-hero {
        grid-template-columns: 1fr;
    }
}

.rrd-character-hero__image-wrap {
    position: relative;
    border-radius: var(--rrd-radius-xl);
    overflow: hidden;
    box-shadow: var(--rrd-shadow-lg);
}

.rrd-character-hero__image-wrap::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, var(--rrd-primary) 0%, var(--rrd-accent-purple) 50%, var(--rrd-accent-cyan) 100%);
    border-radius: inherit;
    z-index: -1;
}

.rrd-character-hero__image {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: var(--rrd-radius-xl);
}

.rrd-character-hero__content {
    display: flex;
    flex-direction: column;
}

.rrd-character-hero__category {
    display: inline-flex;
    align-items: center;
    gap: var(--rrd-space-sm);
    padding: var(--rrd-space-xs) var(--rrd-space-md);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--rrd-primary-light);
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: var(--rrd-radius-full);
    width: fit-content;
    margin-bottom: var(--rrd-space-md);
}

.rrd-character-hero__name {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-family: var(--rrd-font-display);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--rrd-space-lg);
    background: linear-gradient(135deg, var(--rrd-text-primary) 0%, var(--rrd-text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rrd-character-hero__tagline {
    font-size: 1.25rem;
    color: var(--rrd-text-secondary);
    line-height: 1.6;
    margin-bottom: var(--rrd-space-xl);
}

/* Character Stats Row */
.rrd-character-hero__stats {
    display: flex;
    align-items: center;
    gap: var(--rrd-space-xl);
    padding: var(--rrd-space-lg) 0;
    border-top: 1px solid var(--rrd-border-subtle);
    border-bottom: 1px solid var(--rrd-border-subtle);
    margin-bottom: var(--rrd-space-xl);
}

.rrd-hero-stat {
    text-align: center;
}

.rrd-hero-stat__value {
    font-family: var(--rrd-font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--rrd-text-primary);
}

.rrd-hero-stat__label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--rrd-text-muted);
    margin-top: var(--rrd-space-xs);
}

/* Chat CTA Button */
.rrd-chat-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--rrd-space-md);
    padding: var(--rrd-space-md) var(--rrd-space-xl);
    font-family: var(--rrd-font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #fff;
    background: linear-gradient(135deg, var(--rrd-primary) 0%, var(--rrd-primary-dark) 100%);
    border-radius: var(--rrd-radius-md);
    box-shadow: var(--rrd-shadow-md), var(--rrd-shadow-glow);
    transition: all var(--rrd-transition-medium);
    width: fit-content;
}

.rrd-chat-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--rrd-shadow-lg), 0 0 60px var(--rrd-primary-glow);
    color: #fff;
}

.rrd-chat-cta svg {
    width: 24px;
    height: 24px;
}

/* ============================================
   CHARACTER INFO TABLE
   ============================================ */
.rrd-character-info {
    background: var(--rrd-bg-card);
    border: 1px solid var(--rrd-border-subtle);
    border-radius: var(--rrd-radius-xl);
    padding: var(--rrd-space-xl);
    margin-bottom: var(--rrd-space-2xl);
}

.rrd-character-info__title {
    font-family: var(--rrd-font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--rrd-text-primary);
    margin-bottom: var(--rrd-space-lg);
    display: flex;
    align-items: center;
    gap: var(--rrd-space-sm);
}

.rrd-character-info__title svg {
    width: 24px;
    height: 24px;
    color: var(--rrd-primary);
}

.rrd-info-table {
    width: 100%;
    border-collapse: collapse;
}

.rrd-info-table tr {
    border-bottom: 1px solid var(--rrd-border-subtle);
}

.rrd-info-table tr:last-child {
    border-bottom: none;
}

.rrd-info-table th,
.rrd-info-table td {
    padding: var(--rrd-space-md) var(--rrd-space-lg);
    text-align: left;
}

.rrd-info-table th {
    width: 180px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--rrd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--rrd-bg-medium);
}

.rrd-info-table td {
    font-size: 1rem;
    color: var(--rrd-text-primary);
}

/* ============================================
   CHARACTER BACKSTORY / DESCRIPTION
   ============================================ */
.rrd-character-backstory {
    background: var(--rrd-bg-card);
    border: 1px solid var(--rrd-border-subtle);
    border-radius: var(--rrd-radius-xl);
    padding: var(--rrd-space-xl);
    margin-bottom: var(--rrd-space-2xl);
}

.rrd-character-backstory__title {
    font-family: var(--rrd-font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--rrd-text-primary);
    margin-bottom: var(--rrd-space-lg);
    display: flex;
    align-items: center;
    gap: var(--rrd-space-sm);
}

.rrd-character-backstory__title svg {
    width: 24px;
    height: 24px;
    color: var(--rrd-primary);
}

.rrd-character-backstory__content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--rrd-text-secondary);
}

.rrd-character-backstory__content p {
    margin-bottom: var(--rrd-space-md);
}

.rrd-character-backstory__content p:last-child {
    margin-bottom: 0;
}

/* ============================================
   RELATED CHARACTERS
   ============================================ */
.rrd-related {
    margin-top: var(--rrd-space-3xl);
}

.rrd-related__title {
    font-family: var(--rrd-font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--rrd-text-primary);
    margin-bottom: var(--rrd-space-xl);
}

/* ============================================
   BUTTONS
   ============================================ */
.rrd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--rrd-space-sm);
    padding: var(--rrd-space-sm) var(--rrd-space-lg);
    font-family: var(--rrd-font-body);
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--rrd-radius-md);
    transition: all var(--rrd-transition-fast);
    cursor: pointer;
}

.rrd-btn--primary {
    color: #fff;
    background: linear-gradient(135deg, var(--rrd-primary) 0%, var(--rrd-primary-dark) 100%);
    border: none;
}

.rrd-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--rrd-shadow-md), var(--rrd-shadow-glow);
}

.rrd-btn--secondary {
    color: var(--rrd-text-primary);
    background: var(--rrd-bg-light);
    border: 1px solid var(--rrd-border-medium);
}

.rrd-btn--secondary:hover {
    background: var(--rrd-bg-medium);
    border-color: var(--rrd-border-strong);
}

.rrd-btn--ghost {
    color: var(--rrd-text-secondary);
    background: transparent;
    border: none;
}

.rrd-btn--ghost:hover {
    color: var(--rrd-text-primary);
    background: var(--rrd-bg-light);
}

/* ============================================
   PAGINATION
   ============================================ */
.rrd-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--rrd-space-sm);
    margin-top: var(--rrd-space-3xl);
}

.rrd-pagination__item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--rrd-text-secondary);
    background: var(--rrd-bg-card);
    border: 1px solid var(--rrd-border-subtle);
    border-radius: var(--rrd-radius-md);
    transition: all var(--rrd-transition-fast);
}

.rrd-pagination__item:hover {
    color: var(--rrd-text-primary);
    background: var(--rrd-bg-light);
    border-color: var(--rrd-border-medium);
}

.rrd-pagination__item--active {
    color: #fff;
    background: var(--rrd-primary);
    border-color: var(--rrd-primary);
}

.rrd-pagination__item--disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ============================================
   FOOTER
   ============================================ */
.rrd-footer {
    margin-left: var(--rrd-sidebar-width);
    padding: var(--rrd-space-3xl) var(--rrd-space-2xl);
    background: var(--rrd-bg-dark);
    border-top: 1px solid var(--rrd-border-subtle);
}

@media (max-width: 1024px) {
    .rrd-footer {
        margin-left: 0;
    }
}

.rrd-footer__inner {
    max-width: var(--rrd-container-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--rrd-space-2xl);
}

.rrd-footer__section h4 {
    font-family: var(--rrd-font-heading);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--rrd-text-primary);
    margin-bottom: var(--rrd-space-md);
}

.rrd-footer__links {
    display: flex;
    flex-direction: column;
    gap: var(--rrd-space-sm);
}

.rrd-footer__links a {
    font-size: 0.9375rem;
    color: var(--rrd-text-muted);
    transition: color var(--rrd-transition-fast);
}

.rrd-footer__links a:hover {
    color: var(--rrd-primary-light);
}

.rrd-footer__bottom {
    margin-top: var(--rrd-space-2xl);
    padding-top: var(--rrd-space-xl);
    border-top: 1px solid var(--rrd-border-subtle);
    text-align: center;
    color: var(--rrd-text-muted);
    font-size: 0.875rem;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes scaleIn {
    from { 
        opacity: 0;
        transform: scale(0.95);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

.rrd-animate-fade {
    animation: fadeIn var(--rrd-transition-medium) ease-out;
}

.rrd-animate-slide {
    animation: slideUp var(--rrd-transition-medium) ease-out;
}

.rrd-animate-scale {
    animation: scaleIn var(--rrd-transition-medium) ease-out;
}

/* Staggered animations for grid items */
.rrd-character-grid .rrd-character-card {
    animation: slideUp var(--rrd-transition-slow) ease-out backwards;
}

.rrd-character-grid .rrd-character-card:nth-child(1) { animation-delay: 0ms; }
.rrd-character-grid .rrd-character-card:nth-child(2) { animation-delay: 50ms; }
.rrd-character-grid .rrd-character-card:nth-child(3) { animation-delay: 100ms; }
.rrd-character-grid .rrd-character-card:nth-child(4) { animation-delay: 150ms; }
.rrd-character-grid .rrd-character-card:nth-child(5) { animation-delay: 200ms; }
.rrd-character-grid .rrd-character-card:nth-child(6) { animation-delay: 250ms; }
.rrd-character-grid .rrd-character-card:nth-child(7) { animation-delay: 300ms; }
.rrd-character-grid .rrd-character-card:nth-child(8) { animation-delay: 350ms; }

/* ============================================
   UTILITY CLASSES
   ============================================ */
.rrd-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.rrd-text-center { text-align: center; }
.rrd-text-left { text-align: left; }
.rrd-text-right { text-align: right; }

.rrd-mt-sm { margin-top: var(--rrd-space-sm); }
.rrd-mt-md { margin-top: var(--rrd-space-md); }
.rrd-mt-lg { margin-top: var(--rrd-space-lg); }
.rrd-mt-xl { margin-top: var(--rrd-space-xl); }

.rrd-mb-sm { margin-bottom: var(--rrd-space-sm); }
.rrd-mb-md { margin-bottom: var(--rrd-space-md); }
.rrd-mb-lg { margin-bottom: var(--rrd-space-lg); }
.rrd-mb-xl { margin-bottom: var(--rrd-space-xl); }

/* Mobile Menu Toggle */
.rrd-mobile-toggle {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: var(--rrd-bg-light);
    border: 1px solid var(--rrd-border-subtle);
    border-radius: var(--rrd-radius-md);
    color: var(--rrd-text-primary);
}

@media (max-width: 1024px) {
    .rrd-mobile-toggle {
        display: flex;
    }
}

.rrd-mobile-toggle svg {
    width: 24px;
    height: 24px;
}

/* Mobile Overlay */
.rrd-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all var(--rrd-transition-medium);
    z-index: 99;
}

.rrd-overlay--active {
    opacity: 1;
    visibility: visible;
}
