/* AR Lehrprojekt – Basis-CSS */

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

:root {
    --color-primary: #1a56db;
    --color-primary-dark: #1240a8;
    --color-secondary: #6b7280;
    --color-danger: #dc2626;
    --color-success: #16a34a;
    --color-bg: #f9fafb;
    --color-surface: #ffffff;
    --color-border: #e5e7eb;
    --color-text: #111827;
    --color-muted: #6b7280;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.08);
}

html { font-size: 16px; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
}

/* Layout */
.container { max-width: 900px; margin: 0 auto; padding: 0 1.25rem; }
.page { padding: 2rem 0; }

/* Navigation */
.site-nav {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: .75rem 0;
}
.site-nav .container { display: flex; align-items: center; gap: 1.5rem; }
.site-nav a { color: var(--color-text); text-decoration: none; font-weight: 500; }
.site-nav a:hover { color: var(--color-primary); }
.site-nav .spacer { flex: 1; }

/* Landing */
.landing {
    max-width: 480px;
    margin: 6rem auto;
    text-align: center;
    padding: 2rem;
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.landing h1 { font-size: 1.75rem; margin-bottom: .5rem; }
.landing p { color: var(--color-muted); margin-bottom: 1.5rem; }
.landing nav { display: flex; gap: .75rem; justify-content: center; margin-bottom: 1rem; }
.hint { font-size: .875rem; color: var(--color-muted); }

/* Buttons */
.btn {
    display: inline-block;
    padding: .55rem 1.25rem;
    border-radius: var(--radius);
    font-size: .9375rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background .15s;
    background: var(--color-primary);
    color: #fff;
}
.btn:hover { background: var(--color-primary-dark); }
.btn-secondary { background: var(--color-secondary); }
.btn-secondary:hover { background: #4b5563; }
.btn-danger { background: var(--color-danger); }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: .3rem .8rem; font-size: .8125rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 500; margin-bottom: .35rem; font-size: .9375rem; }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: .5rem .75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    background: var(--color-surface);
    color: var(--color-text);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(26,86,219,.15);
}
.form-hint { font-size: .8125rem; color: var(--color-muted); margin-top: .3rem; }

/* Cards */
.card {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}
.card-title { font-size: 1.125rem; font-weight: 600; margin-bottom: 1rem; }

/* Alerts */
.alert {
    padding: .75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: .9375rem;
}
.alert-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.alert-error   { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-info    { background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.table th, .table td { padding: .6rem .875rem; text-align: left; border-bottom: 1px solid var(--color-border); }
.table th { font-weight: 600; background: var(--color-bg); }
.table tr:hover td { background: #f3f4f6; }

/* Marker image */
.marker-img { display: block; max-width: 240px; border: 2px solid var(--color-border); border-radius: 4px; margin-bottom: 1rem; }

/* Marker pill (compact id badge in tables) */
.marker-pill {
    display: inline-block;
    padding: .15rem .55rem;
    border-radius: 99px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: .8125rem;
}

/* Definition-list style for model details */
.model-meta { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.25rem; margin: .75rem 0; }
.model-meta dt { color: var(--color-muted); font-weight: 500; }
.model-meta dd { margin: 0; }

/* Auth box */
.auth-box {
    max-width: 420px;
    margin: 4rem auto;
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
}
.auth-box h1 { font-size: 1.5rem; margin-bottom: 1.5rem; }

/* AR Viewer – fullscreen */
.ar-viewer-wrap { position: fixed; inset: 0; background: #000; }
.ar-viewer-wrap a-scene { width: 100%; height: 100%; }
.ar-ui-overlay {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: .75rem;
    z-index: 999;
}

/* Upload progress */
.progress-bar-wrap { background: var(--color-border); border-radius: 99px; height: 8px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--color-primary); transition: width .2s; width: 0%; }

/* Footer */
.site-footer {
    margin-top: 3rem;
    padding: 1.25rem 0;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
    font-size: .875rem;
    color: var(--color-muted);
}
.site-footer .container { display: flex; align-items: center; gap: 1.5rem; }
.site-footer .spacer { flex: 1; }
.site-footer a { color: var(--color-muted); text-decoration: none; }
.site-footer a:hover { color: var(--color-text); }

/* Print styles */
@media print {
    body { background: #fff; }
    .no-print { display: none !important; }
    .print-marker { page-break-inside: avoid; }
}
