/* ExamSim Account Claim — Stylesheet
   Design: studio.uni-bayreuth.de (ZHL green, clean, modern) */

:root {
    --primary: #009260;
    --primary-dark: #007a50;
    --primary-darker: #005c3d;
    --primary-light: rgba(0, 146, 96, 0.08);
    --primary-glow: var(--primary-glow);

    --text: #2d3748;
    --text-muted: #718096;
    --text-dim: #a0aec0;

    --bg: #ffffff;
    --bg-light: #f8f9fa;
    --bg-card: #ffffff;

    --border: #e2e8f0;
    --border-hover: #cbd5e0;

    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.08);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.08);
    --error: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.08);

    --radius: 16px;
    --radius-sm: 12px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.1);

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Reset & base */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary);
    text-decoration: none;
}
a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Header / Nav */
.navbar {
    background: var(--primary);
    padding: 0 1.5rem;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    letter-spacing: -0.01em;
}
.navbar-brand:hover { color: #fff; text-decoration: none; }

.navbar-brand img {
    height: 32px;
    width: auto;
    max-width: 180px;
    background: rgba(255, 255, 255, 0.92);
    padding: 3px 6px;
    border-radius: 4px;
}

.navbar-title { font-weight: 700; }
.navbar-divider { opacity: 0.55; margin: 0 0.1rem; }
.navbar-inst {
    font-weight: 500;
    font-size: 0.95rem;
    opacity: 0.92;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lang-switch {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
}
.lang-switch:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    text-decoration: none;
}

/* Container */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1rem;
    flex: 1;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2.5rem 2rem;
    transition: box-shadow 0.3s;
}

.card-centered {
    text-align: center;
}

.card-success {
    border-color: var(--success);
    border-width: 2px;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.card h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--text);
    letter-spacing: -0.02em;
}

.course-name {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* Credentials box */
.credentials-box {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    margin: 1.5rem 0;
    text-align: left;
}

.credential-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
}
.credential-row:last-child {
    border-bottom: none;
}

.credential-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.credential-value {
    font-weight: 600;
    color: var(--text);
}

.credential-mono {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.95rem;
    background: var(--primary-light);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
}

.credential-copy {
    cursor: pointer;
    user-select: none;
    transition: background 0.15s, color 0.15s, transform 0.1s;
    position: relative;
}
.credential-copy:hover {
    background: var(--primary);
    color: #fff;
}
.credential-copy:active {
    transform: scale(0.97);
}
.credential-copy:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
.credential-copy.copied {
    background: #16a34a;
    color: #fff;
}

/* Text variants */
.text-muted { color: var(--text-muted); }
.text-note {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 1rem;
}
.text-email-sent {
    color: var(--success);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}
.text-returning {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: 0.5rem;
}
.text-contact {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 1.5rem;
}

/* Info box (video tip) */
.info-box {
    background: var(--primary-light);
    border: 1px solid var(--primary-glow);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    color: var(--primary-dark);
    text-align: left;
}
.info-box a {
    color: var(--primary-dark);
    font-weight: 600;
    text-decoration: underline;
}

/* Form elements */
.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: var(--font);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-dim);
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0.4rem 0 1.25rem;
}

/* Alerts */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.alert-error {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-warning {
    background: var(--warning-bg);
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-success {
    background: var(--success-bg);
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font);
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    text-align: center;
}

.btn-primary {
    width: 100%;
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px var(--primary-glow);
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--primary-glow);
    color: #fff;
    text-decoration: none;
}
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}
.btn-outline:hover {
    background: var(--primary-light);
    text-decoration: none;
}

/* Progress bar (status page) */
.progress-section {
    margin: 2rem 0 1rem;
}

.progress-bar-container {
    height: 20px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 10px;
    transition: width 0.6s ease;
    min-width: 2px;
}

.progress-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.75rem;
}

.progress-percent {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 0.25rem;
}

/* Footer */
.footer {
    margin-top: auto;
    padding: 1.5rem 1rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    background: var(--bg);
}
.footer a {
    color: var(--text-muted);
    text-decoration: underline;
}
.footer a:hover {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 1rem 0.75rem;
    }
    .card {
        padding: 1.75rem 1.25rem;
    }
    .card h1 {
        font-size: 1.25rem;
    }
    .credential-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    .navbar {
        padding: 0 1rem;
    }
}
