/* ============================================
   Crafting & Skins for Hytale — Support
   Clean CSS — Dark theme
   ============================================ */

:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-card: #21262d;
    --border: #30363d;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --accent: #f0883e;
    --accent-hover: #e67e2e;
    --accent-muted: rgba(240, 136, 62, 0.15);
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --transition: 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(13, 17, 23, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
}

.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
}

.nav {
    display: flex;
    gap: 28px;
}

.nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition);
}

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

/* Hero */
.hero {
    padding: 64px 0 80px;
}

.hero-block {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
}

.hero-icon-wrapper {
    margin-bottom: 24px;
}

.hero-icon {
    width: 120px;
    height: 120px;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.hero-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.hero-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Features */
.features {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 48px;
    letter-spacing: -0.02em;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent-muted);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.feature-list {
    list-style: none;
}

.feature-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.feature-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
}

/* Screenshots */
.screenshots {
    padding: 80px 0;
}

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

.screenshot-item {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    cursor: pointer;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.screenshot-item:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent-muted);
}

.screenshot-item img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-sm);
}

.screenshot-ipad {
    padding: 24px;
}

.screenshot-iphone {
    max-width: 280px;
    margin: 0 auto;
}

/* Contact */
.contact {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.contact-intro {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.contact-form {
    max-width: 560px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    width: 100%;
    padding: 14px 24px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--bg-primary);
    background: var(--accent);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition);
}

.btn-submit:hover {
    background: var(--accent-hover);
}

/* Footer */
.footer {
    padding: 32px 0;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-icon {
    border-radius: var(--radius-sm);
}

.footer-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition);
}

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

/* Legal pages (Terms, Privacy) */
.legal-page {
    padding: 64px 0 80px;
}

.legal-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.legal-updated {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 32px;
}

.legal-page h2 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 12px;
}

.legal-page p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 16px;
}

.legal-page a {
    color: var(--accent);
    text-decoration: none;
}

.legal-page a:hover {
    text-decoration: underline;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 24px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    max-width: 50%;
    margin: 0 auto;
}

.lightbox[hidden] {
    display: none;
}

.lightbox-content {
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 95vh;
    height: 100%;
    display: block;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    padding: 0;
    font-size: 2rem;
    line-height: 1;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
}

.lightbox-close:hover {
    background: var(--accent);
    border-color: var(--accent);
}

/* Responsive */
@media (max-width: 640px) {
    .header .container {
        flex-direction: column;
        gap: 16px;
    }

    .nav {
        gap: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .screenshots-grid {
        grid-template-columns: 1fr;
    }

    .screenshot-iphone {
        max-width: none;
    }
}
