/* Yoodle - Styles */
:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
}

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

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

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: var(--primary);
    color: white;
    padding: 20px 0;
    box-shadow: var(--shadow-lg);
}

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

header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

header h1 span {
    opacity: 0.7;
    font-weight: 400;
    font-size: 0.9rem;
    margin-left: 8px;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s;
}

nav a:hover {
    background: rgba(255,255,255,0.15);
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
    margin-bottom: 20px;
}

.card h2 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: var(--text);
}

.card h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--text);
}

.card p {
    color: var(--text-light);
    margin-bottom: 16px;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    text-decoration: none;
    font-family: inherit;
}

.btn:active {
    transform: scale(0.98);
}

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

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

.btn-secondary {
    background: var(--border);
    color: var(--text);
}

.btn-secondary:hover {
    background: #cbd5e1;
}

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

.btn-success:hover {
    background: #16a34a;
}

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

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.links-container {
    background: #f1f5f9;
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
}

.link-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.link-item:last-child {
    margin-bottom: 0;
}

.link-item input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
    background: white;
    color: var(--text-light);
    font-family: monospace;
}

.copy-btn {
    padding: 8px 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s;
}

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

.copy-btn.copied {
    background: var(--success);
}

.option-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.option-row input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.option-row .remove-option {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--danger);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.option-row .remove-option:hover {
    background: #dc2626;
}

.voting-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.voting-table th,
.voting-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.voting-table th {
    background: #f8fafc;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.voting-table tr:last-child td {
    border-bottom: none;
}

.vote-radio {
    display: inline-flex;
    gap: 4px;
}

.vote-radio label {
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.2s;
    border: 1px solid transparent;
}

.vote-ja {
    color: var(--success);
}

.vote-nein {
    color: var(--danger);
}

.vote-vielleicht {
    color: var(--warning);
}

.result-bar-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0;
}

.result-bar {
    height: 24px;
    border-radius: 4px;
    min-width: 4px;
    transition: width 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.result-bar-ja {
    background: var(--success);
}

.result-bar-nein {
    background: var(--danger);
}

.result-bar-vielleicht {
    background: var(--warning);
}

.result-label {
    min-width: 80px;
    font-weight: 500;
    font-size: 0.9rem;
}

.result-count {
    min-width: 60px;
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-light);
}

.survey-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.survey-item:last-child {
    border-bottom: none;
}

.survey-item-info h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.survey-item-info p {
    font-size: 0.85rem;
    margin-bottom: 0;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-active {
    background: #dcfce7;
    color: #16a34a;
}

.badge-inactive {
    background: #f1f5f9;
    color: var(--text-light);
}

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

.mt-2 {
    margin-top: 16px;
}

.mb-2 {
    margin-bottom: 16px;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.add-option-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    background: transparent;
    border: 2px dashed var(--border);
    border-radius: 8px;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    transition: border-color 0.2s, background 0.2s;
}

.add-option-btn:hover {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

.empty-state p {
    font-size: 1.1rem;
}

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #1e293b;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1000;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.admin-input {
    max-width: 300px;
    margin: 0 auto 20px;
    display: block;
}

@media (max-width: 600px) {
    .container {
        padding: 12px;
    }

    .card {
        padding: 20px;
    }

    header h1 {
        font-size: 1.4rem;
    }

    header h1 span {
        display: none;
    }

    .option-row {
        flex-wrap: wrap;
    }

    .option-row .remove-option {
        width: 100%;
        height: 36px;
        margin-top: 4px;
    }

    .link-item {
        flex-direction: column;
        align-items: stretch;
    }

    .link-item input {
        width: 100%;
    }

    .link-item .copy-btn {
        align-self: flex-end;
    }

    .flex-between {
        flex-direction: column;
        align-items: flex-start;
    }

    .voting-table {
        font-size: 0.85rem;
    }

    .voting-table th,
    .voting-table td {
        padding: 8px;
    }
}
