@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Outfit:wght@400;600&display=swap');

:root {
    --bg: #0A0A0B;
    --card-bg: #141416;
    --border: #232326;
    --text-primary: #FFFFFF;
    --text-secondary: #94949E;
    --accent: #3E8BFF;
    --accent-glow: rgba(62, 139, 255, 0.2);
    --error: #FF4D4D;
    --success: #2ECC71;
    --warning: #F1C40F;
}

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

body {
    background-color: var(--bg);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 4rem;
}

header h1 {
    font-size: 2.5rem;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Simulator Section */
.simulator-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 4rem;
    display: grid;
    grid-template-columns: 1fr 350px;
}

@media (max-width: 900px) {
    .simulator-card {
        grid-template-columns: 1fr;
    }
}

.viewfinder-container {
    background: #000;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

canvas {
    max-width: 100%;
    height: auto;
}

.controls {
    padding: 2rem;
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .controls {
        border-left: none;
        border-top: 1px solid var(--border);
    }
}

.simulator-card.practice-card {
    grid-template-columns: 1fr 300px;
}

@media (max-width: 900px) {
    .simulator-card.practice-card {
        grid-template-columns: 1fr !important;
    }
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
}

.control-label span {
    color: var(--accent);
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--border) 0%, var(--border) 100%);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.control-group.important {
    border-left: 2px solid var(--accent);
    padding-left: 1rem;
    margin-left: -1rem;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--text-primary);
    border: 2px solid var(--accent);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(62, 139, 255, 0.4);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

input[type="range"]:active::-webkit-slider-thumb {
    transform: scale(1.1);
    box-shadow: 0 0 25px var(--accent);
}

.status-badge {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Cheat Sheet */
.section-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: border-color 0.2s ease;
}

.card:hover {
    border-color: var(--text-secondary);
}

.card h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.card strong {
    color: var(--text-primary);
}

.card ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.card li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding-left: 1.25rem;
    position: relative;
    line-height: 1.4;
}

.card li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* Automation Section */
.code-block {
    background: #000;
    padding: 1rem;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--accent);
    overflow-x: auto;
    border: 1px solid var(--border);
    text-align: center;
    margin-top: 1rem;
}

/* Guide Items */
.guide-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.guide-item:last-child {
    border-bottom: none;
}

.guide-header {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.guide-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.guide-list li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding-left: 1.25rem;
    position: relative;
    line-height: 1.4;
}

.guide-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.guide-list a {
    color: var(--text-primary);
    text-decoration: underline;
    text-decoration-color: var(--border);
    text-underline-offset: 4px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.guide-list a:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

/* Challenge Card & Buttons */
.challenge-card {
    margin-bottom: 4rem;
    border-left: 4px solid var(--accent);
}

.challenge-card p {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.download-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.download-links a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: var(--border);
    text-underline-offset: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.download-links a:hover {
    text-decoration-color: var(--accent);
    opacity: 0.8;
}

/* Credits & Footer */
footer {
    margin-top: 6rem;
    padding-top: 4rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.credits {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.credits h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
}

.credits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.credit-item a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

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

.credit-item p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Post-Processing Tool specific styles */
.simulator-card img {
    display: block;
    user-select: none;
    pointer-events: none;
}

select {
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

select:hover {
    border-color: var(--accent) !important;
}

button:hover {
    background: var(--text-secondary) !important;
    color: var(--bg) !important;
}

/* Tooltip or Help Text */
.help-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.status-badge {
    transition: all 0.3s ease;
}

/* Author Tag improvements */
.author-tag {
    line-height: 1.8;
}

.author-tag small {
    opacity: 0.6;
}
