/* ============================================================================
   Wardrobe Showcase - Modern, Responsive Design
   ============================================================================ */

/* CSS Custom Properties */
:root {
    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;

    /* Colors */
    --color-text: #1a1a1a;
    --color-text-light: #666;
    --color-text-lighter: #999;
    --color-bg: #ffffff;
    --color-bg-alt: #f9f9f9;
    --color-border: #e5e5e5;
    --color-primary: #0066cc;
    --color-primary-dark: #004499;
    --color-accent: #ff6b35;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;

    /* Border & Shadow */
    --border-radius: 8px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
}

/* ============================================================================
   Base Styles
   ============================================================================ */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    margin: 0;
    padding: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.25rem;
}

p {
    margin: 0;
}

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

a:hover {
    color: var(--color-primary-dark);
}

code {
    font-family: var(--font-mono);
    background-color: var(--color-bg-alt);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
}

/* ============================================================================
   Layout Utilities
   ============================================================================ */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ============================================================================
   Header
   ============================================================================ */

.header {
    background-color: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border);
    padding: var(--spacing-lg) 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
}

.logo h1 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.tagline {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 0;
}

.nav {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav a {
    font-weight: 500;
    transition: color var(--transition-fast);
}

.nav a:hover {
    color: var(--color-accent);
}

/* ============================================================================
   Hero Section
   ============================================================================ */

.hero {
    padding: var(--spacing-2xl) 0;
    text-align: center;
    background: linear-gradient(135deg, #f9f9f9 0%, #ffffff 100%);
    border-bottom: 1px solid var(--color-border);
}

.hero-title {
    font-size: clamp(1.75rem, 5vw, 3rem);
    margin-bottom: var(--spacing-md);
    color: var(--color-text);
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    padding: var(--spacing-lg) 0;
}

.code-block {
    display: inline-block;
    background-color: var(--color-text);
    color: #fff;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--border-radius);
    font-family: var(--font-mono);
    font-size: 1rem;
    user-select: all;
    box-shadow: var(--shadow-md);
}

/* ============================================================================
   Themes Section
   ============================================================================ */

.themes-section {
    padding: var(--spacing-2xl) 0;
}

.section-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    text-align: center;
    margin-bottom: var(--spacing-sm);
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-2xl);
    font-size: 1.0625rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Theme Grid - Mobile First */
.themes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-2xl);
}

@media (min-width: 640px) {
    .themes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
}

@media (min-width: 1024px) {
    .themes-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: var(--spacing-md);
    }
}

/* Theme Card */
.theme-card {
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.theme-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--color-primary);
}

.theme-image {
    width: 100%;
    aspect-ratio: 1;
    background-color: var(--color-bg-alt);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
}

.theme-content {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.theme-name {
    font-size: 1.375rem;
    margin-bottom: var(--spacing-xs);
    color: var(--color-text);
}

.theme-description {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: var(--spacing-sm);
    line-height: 1.4;
}

.theme-personality {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
    line-height: 1.4;
}

.theme-install {
    display: flex;
    gap: var(--spacing-xs);
    align-items: stretch;
    margin-top: auto;
}

.install-command {
    flex-grow: 1;
    background-color: var(--color-bg-alt);
    padding: var(--spacing-sm);
    border-radius: 4px;
    font-size: 0.875rem;
    font-family: var(--font-mono);
    border: 1px solid var(--color-border);
    user-select: all;
    word-break: break-all;
}

.copy-btn {
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.875rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.copy-btn:hover {
    background-color: var(--color-primary-dark);
    transform: scale(1.05);
}

.copy-btn:active {
    transform: scale(0.95);
}

.copy-btn.copied {
    background-color: #22c55e;
}

/* ============================================================================
   Install Guide Section
   ============================================================================ */

.install-section {
    background-color: var(--color-bg-alt);
    padding: var(--spacing-2xl) 0;
    border-top: 1px solid var(--color-border);
}

.install-steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
}

@media (min-width: 768px) {
    .install-steps {
        grid-template-columns: repeat(3, 1fr);
    }
}

.step {
    text-align: center;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background-color: var(--color-primary);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
}

.step h3 {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-sm);
}

.step p {
    color: var(--color-text-light);
}

/* ============================================================================
   Footer
   ============================================================================ */

.footer {
    background-color: var(--color-text);
    color: white;
    padding: var(--spacing-lg) 0;
    text-align: center;
    border-top: 1px solid #333;
}

.footer p {
    margin: 0.5rem 0;
    opacity: 0.8;
}

.footer-note {
    font-size: 0.875rem;
    opacity: 0.6;
    margin-top: var(--spacing-sm) !important;
    font-style: italic;
}

/* ============================================================================
   Accessibility
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus states for keyboard navigation */
a:focus,
button:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ============================================================================
   Print Styles
   ============================================================================ */

@media print {
    .header,
    .footer,
    .install-section {
        display: none;
    }

    .theme-card {
        page-break-inside: avoid;
    }
}

/* ============================================================================
   Very Small Screens (375px and below)
   ============================================================================ */

@media (max-width: 375px) {
    :root {
        --spacing-md: 1rem;
        --spacing-lg: 1.5rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .header .container {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .nav {
        width: 100%;
        justify-content: center;
    }

    .theme-install {
        flex-direction: column;
    }

    .copy-btn {
        width: 100%;
    }
}
