/* ═══════════════════════════════════════════════════════════
   Dorfflohmarkt Feedback — Hauptstylesheet
   Modern, clean, responsive design
   ═══════════════════════════════════════════════════════════ */


/* ─── Reset & Variables ───────────────────────────────── */

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --primary-50: #e0e7ff;
    --success: #10b981;
    --success-bg: #ecfdf5;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --warning: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --transition: 0.2s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--gray-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}


/* ─── Container ───────────────────────────────────────── */

.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 24px 16px;
}


/* ─── Header ──────────────────────────────────────────── */

.header {
    text-align: center;
    margin-bottom: 32px;
    color: var(--white);
}

.header-icon {
    font-size: 56px;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
    animation: bounceIn 0.6s ease;
}

.header-logo {
    width: 240px;
    height: 240px;
    object-fit: contain;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
    animation: bounceIn 0.6s ease;
    border-radius: 30%;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px;
}

.login-logo {
    width: 150px;
    height: 150px;
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 16px;
    opacity: 0.9;
    font-weight: 300;
}


/* ─── Form ────────────────────────────────────────────── */

.feedback-form {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    box-shadow: var(--shadow-xl);
}

.form-section {
    margin-bottom: 28px;
}

.form-section:last-of-type {
    margin-bottom: 0;
}

.section-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 14px;
}

.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}


/* ─── Toggle (Anonym / Name) ──────────────────────────── */

.toggle-group {
    display: flex;
    gap: 10px;
}

.toggle-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 15px;
    font-weight: 500;
    color: var(--gray-600);
    user-select: none;
}

.toggle-option input {
    display: none;
}

.toggle-option:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.toggle-option.active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

.toggle-icon {
    font-size: 20px;
}

.name-field {
    margin-top: 12px;
    transition: all 0.3s ease;
}


/* ─── Star Rating ─────────────────────────────────────── */

.star-rating {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 8px 0;
}

.star {
    background: none;
    border: none;
    cursor: pointer;
    width: 48px;
    height: 48px;
    color: var(--gray-300);
    transition: all 0.15s ease;
    padding: 0;
    border-radius: 8px;
}

.star:hover {
    transform: scale(1.2);
}

.star svg {
    width: 100%;
    height: 100%;
}

.star.hover svg,
.star.active svg {
    fill: var(--warning);
    stroke: var(--warning);
    color: var(--warning);
}

.star.active {
    color: var(--warning);
}

.rating-label {
    text-align: center;
    font-size: 14px;
    color: var(--gray-400);
    margin-top: 6px;
    transition: all var(--transition);
}

.rating-label.rating-selected {
    color: var(--gray-700);
    font-weight: 500;
}


/* ─── Input Fields ────────────────────────────────────── */

.input-field {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    color: var(--gray-800);
    background: var(--white);
    transition: all var(--transition);
    outline: none;
}

.input-field:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.input-field::placeholder {
    color: var(--gray-400);
}

.textarea-field {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    color: var(--gray-800);
    background: var(--white);
    transition: all var(--transition);
    outline: none;
    resize: vertical;
    min-height: 100px;
}

.textarea-field:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.textarea-field::placeholder {
    color: var(--gray-400);
}

.char-count {
    text-align: right;
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 4px;
}

.char-count.near-limit {
    color: var(--danger);
    font-weight: 500;
}


/* ─── Buttons ─────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-outline {
    background: transparent;
    color: var(--gray-600);
    border: 1px solid var(--gray-300);
}

.btn-outline:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

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

.btn-sm {
    padding: 8px 14px;
    font-size: 13px;
}

.btn-full {
    width: 100%;
}

.btn-submit {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    margin-top: 24px;
}


/* ─── Spinner ─────────────────────────────────────────── */

.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}


/* ─── Messages ────────────────────────────────────────── */

.success-message {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 48px 28px;
    text-align: center;
    box-shadow: var(--shadow-xl);
}

.success-icon {
    font-size: 64px;
    margin-bottom: 16px;
    animation: bounceIn 0.5s ease;
}

.success-message h2 {
    font-size: 22px;
    margin-bottom: 8px;
    color: var(--gray-800);
}

.success-message p {
    color: var(--gray-500);
    margin-bottom: 24px;
}

.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 16px;
    color: var(--danger);
    font-size: 14px;
    font-weight: 500;
    animation: shake 0.4s ease;
}


/* ─── Footer ──────────────────────────────────────────── */

.footer {
    text-align: center;
    padding: 24px 0 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}


/* ─── Utilities ───────────────────────────────────────── */

.hidden {
    display: none !important;
}

.form-actions {
    border-top: 1px solid var(--gray-100);
    padding-top: 4px;
}


/* ─── Animations ──────────────────────────────────────── */

@keyframes bounceIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    60% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-6px);
    }
    75% {
        transform: translateX(6px);
    }
}


/* ─── Responsive ──────────────────────────────────────── */

@media (max-width: 480px) {
    .container {
        padding: 16px 12px;
    }
    .header h1 {
        font-size: 22px;
    }
    .feedback-form {
        padding: 24px 18px;
    }
    .star {
        width: 40px;
        height: 40px;
    }
    .toggle-group {
        flex-direction: column;
    }
    .toggle-option {
        padding: 12px;
    }
}