/* ==========================================================================
   PurrfectHaven - Modern Cat Camouflage Portal Stylesheet
   ========================================================================== */

:root {
    /* Color Palette - Dark Theme (Default) */
    --bg-dark: #0f1117;
    --bg-surface: #181b24;
    --bg-card: #202432;
    --bg-glass: rgba(24, 27, 36, 0.75);
    
    --accent-orange: #ff7e47;
    --accent-amber: #ffb830;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 126, 71, 0.4);
    
    --gradient-primary: linear-gradient(135deg, #ff7e47 0%, #ffb830 100%);
    --gradient-purple: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 30px rgba(255, 126, 71, 0.25);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Variables */
body.theme-light {
    --bg-dark: #f8fafc;
    --bg-surface: #ffffff;
    --bg-card: #f1f5f9;
    --bg-glass: rgba(255, 255, 255, 0.85);
    
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(255, 126, 71, 0.5);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
    position: relative;
}

/* Background Glow Effects */
.glow-sphere {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: -1;
    opacity: 0.4;
}

.sphere-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-orange);
    top: -100px;
    left: -100px;
}

.sphere-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-purple);
    bottom: -150px;
    right: -100px;
}

/* Layout Container */
.container {
    width: 90%;
    max-width: 1240px;
    margin: 0 auto;
}

/* Typography & Helpers */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    background: rgba(255, 126, 71, 0.15);
    color: var(--accent-orange);
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid rgba(255, 126, 71, 0.3);
    margin-bottom: 16px;
}

.badge-sm {
    padding: 4px 12px;
    font-size: 0.75rem;
}

.badge-accent {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-purple);
    border-color: rgba(139, 92, 246, 0.3);
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 28px;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 35px rgba(255, 126, 71, 0.45);
}

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

.btn-secondary:hover {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
}

.btn-accent {
    background: var(--gradient-purple);
    color: #fff;
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 35px rgba(139, 92, 246, 0.45);
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.1rem;
}

.btn-xl {
    padding: 18px 42px;
    font-size: 1.2rem;
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.875rem;
}

.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.icon-btn:hover {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
}

/* Theme Toggle Icons */
.light-icon { display: none; }
.dark-icon { display: block; }
body.theme-light .light-icon { display: block; }
body.theme-light .dark-icon { display: none; }

/* Navigation Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 16px 0;
    backdrop-filter: blur(16px);
    background: var(--bg-glass);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--gradient-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.logo-text .highlight {
    color: var(--accent-orange);
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-link {
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-orange);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    overflow: hidden;
}

.hero-video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(15, 17, 23, 0.75) 0%, rgba(15, 17, 23, 0.95) 100%);
}

body.theme-light .hero-overlay {
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.8) 0%, rgba(248, 250, 252, 0.96) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 60px 0;
    max-width: 850px;
}

.hero-title {
    font-size: 3.8rem;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 36px;
    max-width: 680px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.hero-stats {
    display: flex;
    gap: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-plus, .stat-percent {
    font-size: 1.8rem;
    color: var(--accent-orange);
    font-weight: 800;
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Sections Common */
.section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.6rem;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Video Gallery Section */
.filter-bar {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 22px;
    border-radius: var(--radius-full);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
    background: var(--gradient-primary);
    color: #fff;
    border-color: transparent;
}

.main-player-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 0;
    margin-bottom: 40px;
    box-shadow: var(--shadow-md);
}

.video-container {
    position: relative;
    background: #000;
    min-height: 380px;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-info {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.video-title {
    font-size: 1.8rem;
    margin: 12px 0;
}

.video-desc {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.video-meta {
    display: flex;
    gap: 20px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.video-card {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.video-card:hover, .video-card.active {
    transform: translateY(-4px);
    border-color: var(--accent-orange);
    box-shadow: var(--shadow-md);
}

.thumb-wrapper {
    position: relative;
    height: 160px;
    overflow: hidden;
}

.thumb-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.video-card:hover .thumb-wrapper img {
    transform: scale(1.05);
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 126, 71, 0.9);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: var(--shadow-glow);
}

.duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.card-content {
    padding: 16px;
}

.card-content h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.card-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Articles Section */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
}

.article-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
}

.article-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.article-img {
    position: relative;
    height: 220px;
}

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

.category-tag {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-orange);
}

.article-body {
    padding: 28px;
}

.article-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.article-body h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.article-body p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.read-more-btn {
    color: var(--accent-orange);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.read-more-btn:hover {
    gap: 12px;
}

/* Purr Room Generator Section */
.purr-section {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.purr-box {
    max-width: 750px;
    margin: 0 auto;
    padding: 50px 30px;
    background: var(--gradient-glass);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.purr-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-purple);
    color: #fff;
    font-size: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.4);
}

.purr-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    margin: 36px 0;
}

.volume-slider-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 280px;
    color: var(--text-secondary);
}

.volume-slider-wrapper input[type="range"] {
    flex: 1;
    accent-color: var(--accent-purple);
}

.purr-waves {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 6px;
    height: 30px;
    opacity: 0.3;
    transition: var(--transition);
}

.purr-waves.active {
    opacity: 1;
}

.purr-waves span {
    width: 6px;
    height: 10px;
    background: var(--accent-purple);
    border-radius: 4px;
}

.purr-waves.active span {
    animation: wavePulse 1.2s infinite ease-in-out alternate;
}

.purr-waves.active span:nth-child(2) { animation-delay: 0.2s; }
.purr-waves.active span:nth-child(3) { animation-delay: 0.4s; }
.purr-waves.active span:nth-child(4) { animation-delay: 0.6s; }
.purr-waves.active span:nth-child(5) { animation-delay: 0.8s; }

@keyframes wavePulse {
    0% { height: 8px; }
    100% { height: 32px; }
}

/* Breeds Catalogue Section */
.breeds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
}

.breed-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
}

.breed-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.breed-image {
    height: 240px;
}

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

.breed-info {
    padding: 24px;
}

.breed-info h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.breed-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.breed-tags span {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.breed-info p {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

/* Newsletter Section */
.newsletter-card {
    background: var(--gradient-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 60px 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.newsletter-form .input-group {
    display: flex;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 6px;
    margin-bottom: 12px;
}

.newsletter-form input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 20px;
    color: var(--text-primary);
    outline: none;
    font-size: 1rem;
}

.sub-note {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Footer */
.site-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 40px;
    padding-bottom: 60px;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-top: 16px;
    max-width: 320px;
    font-size: 0.95rem;
}

.footer-links h4, .footer-socials h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--accent-orange);
}

.social-icons {
    display: flex;
    gap: 12px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.social-icons a:hover {
    background: var(--accent-orange);
    color: #fff;
    border-color: var(--accent-orange);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 24px 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Article Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 40px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
    .hero-title { font-size: 2.8rem; }
    .main-player-card { grid-template-columns: 1fr; }
    .newsletter-card { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .hidden-mobile { display: none; }
    .mobile-menu-toggle { display: block; }
    
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-surface);
        border-bottom: 1px solid var(--border-color);
        padding: 20px;
        display: none;
    }
    
    .main-nav.active { display: block; }
    .main-nav ul { flex-direction: column; gap: 16px; }
    .hero-title { font-size: 2.2rem; }
    .footer-content { grid-template-columns: 1fr; }
}
