:root {
    color-scheme: dark;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #0f172a;
    color: #e2e8f0;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body.page {
    min-height: 100vh;
    background-color: #0f172a;
    color: #e2e8f0;
}

.site-container {
    width: min(1120px, 100%);
    margin: 0 auto;
    padding: 2.5rem 1rem;
}

.site-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 2.5rem;
    color: #f8fafc;
}

.tiles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .tiles-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .tiles-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.tile {
    display: block;
    background-color: #1e293b;
    border: 1px solid #334155;
    border-radius: 1.25rem;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.35);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tile:hover {
    transform: scale(1.05);
    box-shadow: 0 28px 56px rgba(15, 23, 42, 0.55);
}

.tile-img {
    width: 100%;
    height: 10rem;
    object-fit: cover;
    border-top-left-radius: 1.25rem;
    border-top-right-radius: 1.25rem;
}

.tile-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 1rem;
    color: #f8fafc;
}

.tile-text {
    color: #cbd5e1;
    margin-top: 0.5rem;
    line-height: 1.65;
}

.gradient-card {
    width: 100%;
    height: 10rem;
    border-top-left-radius: 1.25rem;
    border-top-right-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.125rem;
    font-weight: 600;
    background: linear-gradient(90deg, #059669 0%, #334155 100%);
}

.page-card {
    max-width: 56rem;
    margin: 0 auto;
    padding: 2rem;
    background-color: #111827;
    border-radius: 1.75rem;
    border: 1px solid #334155;
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.45);
}

.header-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

.page-heading {
    font-size: clamp(2rem, 3vw, 2.75rem);
    margin: 0 0 0.5rem;
    color: #f8fafc;
}

.page-copy {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.75;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.stacked-panel {
    display: grid;
    gap: 1.5rem;
}

.section-panel {
    background-color: #0f172a;
    border: 1px solid #334155;
    border-radius: 1.5rem;
    padding: 1.5rem;
}

.field-label {
    display: block;
    margin-bottom: 0.75rem;
    color: #e2e8f0;
    font-weight: 600;
}

.field-input {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    border: 1px solid #475569;
    background-color: #1e293b;
    color: #f8fafc;
    outline: none;
    font-size: 1rem;
}

.field-input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.15);
}

.field-hint {
    margin-top: 0.75rem;
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 11rem;
    padding: 0.95rem 1.25rem;
    border-radius: 1rem;
    border: none;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    background-color: #2563eb;
    color: #ffffff;
}

.button-primary:hover {
    background-color: #1d4ed8;
}

.button-success {
    background-color: #059669;
    color: #ffffff;
}

.button-success:hover {
    background-color: #047857;
}

.button-secondary {
    background-color: #334155;
    color: #e2e8f0;
}

.button-secondary:hover {
    background-color: #475569;
}

.result-stack {
    display: grid;
    gap: 1rem;
}

.result-card {
    background-color: #111827;
    border: 1px solid #334155;
    border-radius: 1.5rem;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.3);
    padding: 1.5rem;
}

.result-title {
    margin: 0 0 0.25rem;
    color: #f8fafc;
    font-size: 1.1rem;
    font-weight: 700;
}

.result-text {
    margin: 0;
    color: #94a3b8;
    font-size: 0.95rem;
}

.result-link {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    background-color: #2563eb;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
}

.result-link:hover {
    background-color: #1d4ed8;
}

.error-card {
    padding: 1.25rem;
    border-radius: 1.25rem;
    background-color: #7f1d1d;
    border: 1px solid #991b1b;
    color: #ffe4e6;
}

.upload-area {
    position: relative;
    min-height: 12rem;
    padding: 1.5rem;
    border: 2px dashed #475569;
    border-radius: 1.25rem;
    background-color: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.upload-area.dragover {
    border-color: #60a5fa;
    background-color: rgba(96, 165, 250, 0.08);
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.12);
}

.upload-area-content {
    text-align: center;
    pointer-events: none;
}

.upload-area-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.upload-area-text {
    margin: 0;
    color: #f8fafc;
    font-weight: 600;
}

.upload-area-hint {
    margin: 0.5rem 0 0;
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.5;
}

.file-input-hidden {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.selected-files-list {
    margin: 1rem auto 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.5rem;
    color: #cbd5e1;
    font-size: 0.95rem;
}

.selected-files-list li {
    padding: 0.75rem 1rem;
    background-color: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 0.95rem;
    word-break: break-word;
}

.result-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}
