:root {
    --bg-primary: #0f1117;
    --bg-secondary: #1a1d29;
    --bg-card: #232734;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border: #334155;
    --success: #10b981;
    
    /* Responsive spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
}

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

html {
    font-size: 16px; /* Base font size */
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    padding: var(--space-sm);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    max-width: 1200px; /* Increased for larger screens */
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--space-sm);
}

/* Mobile First Approach */
header {
    text-align: center;
    margin-bottom: var(--space-xl);
    padding-top: var(--space-md);
}

h1 {
    font-size: 2rem; /* Smaller on mobile */
    font-weight: 700;
    margin-bottom: var(--space-xs);
    background: linear-gradient(90deg, var(--accent), #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.4;
}

/* Controls Container - Enhanced Responsiveness */
.controls-container {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

#category-select {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    min-width: 250px; /* Better min-width */
    max-width: 100%;
    cursor: pointer;
    flex: 1;
    min-width: 0; /* Allows shrinking */
}

#category-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Verse Card - Enhanced Responsiveness */
.verse-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: var(--space-lg);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    margin-bottom: var(--space-lg);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    width: 100%;
}

.verse-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.verse-category {
    display: inline-block;
    background: linear-gradient(90deg, var(--accent), #a78bfa);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.verse-content {
    margin-bottom: var(--space-lg);
}

.verse-text {
    font-size: 1.2rem; /* Smaller on mobile */
    line-height: 1.7;
    margin-bottom: var(--space-md);
    font-weight: 500;
    text-align: left;
}

.verse-reference {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.verse-reference:before {
    content: "—";
    margin-right: 8px;
}

.dev-paraphrase {
    background-color: rgba(99, 102, 241, 0.1);
    border-left: 4px solid var(--accent);
    padding: var(--space-md);
    border-radius: 0 8px 8px 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    position: relative;
    line-height: 1.5;
}

.dev-paraphrase:before {
    content: "💻";
    position: absolute;
    left: -12px;
    top: -12px;
    background: var(--bg-card);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    border: 2px solid var(--accent);
}

/* Button - Enhanced Responsiveness */
.btn {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
    font-family: 'Inter', sans-serif;
    width: auto;
    min-width: 200px;
}

.btn:hover:not(:disabled) {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn:active:not(:disabled) {
    transform: translateY(0);
}

footer {
    margin-top: var(--space-xl);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: var(--space-md) 0;
    width: 100%;
}

/* Enhanced Media Queries */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    body {
        padding: var(--space-xs);
    }
    
    .container {
        padding: 0 var(--space-xs);
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    .verse-card {
        padding: var(--space-md);
        margin-bottom: var(--space-md);
    }
    
    .verse-text {
        font-size: 1.1rem;
        line-height: 1.6;
    }
    
    .controls-container {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    #category-select {
        min-width: 100%;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        min-width: auto;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .container {
        max-width: 100%;
        padding: 0 var(--space-md);
    }
    
    h1 {
        font-size: 2.25rem;
    }
    
    .verse-text {
        font-size: 1.25rem;
    }
    
    .controls-container {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    #category-select {
        flex: 1;
        min-width: 200px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    /* Tablet styles */
    .container {
        max-width: 900px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    .verse-card {
        padding: var(--space-xl);
    }
}

@media (min-width: 1025px) {
    /* Desktop styles */
    .container {
        max-width: 1000px;
    }
    
    h1 {
        font-size: 3rem;
    }
    
    .verse-text {
        font-size: 1.4rem;
    }
    
    .verse-card {
        padding: var(--space-xl);
    }
}

/* Large screens (4K and beyond) */
@media (min-width: 1440px) {
    .container {
        max-width: 1200px;
    }
    
    html {
        font-size: 18px;
    }
}

/* Landscape mobile optimization */
@media (max-height: 500px) and (orientation: landscape) {
    body {
        padding: var(--space-xs);
    }
    
    header {
        margin-bottom: var(--space-md);
        padding-top: var(--space-xs);
    }
    
    .verse-card {
        padding: var(--space-md);
        margin-bottom: var(--space-md);
    }
    
    .controls-container {
        margin-bottom: var(--space-md);
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .verse-card,
    .btn {
        transition: none;
    }
    
    .verse-card:hover {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --bg-primary: #000000;
        --bg-secondary: #111111;
        --bg-card: #222222;
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
        --border: #444444;
    }
}

@media (prefers-color-scheme: dark) {
}
