* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4CAF50;
    --secondary-color: #45a049;
    --accent-color: #ff9800;
    --danger-color: #f44336;
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --text-color: #333;
    --border-color: #ddd;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.screen {
    display: none !important;
    min-height: 100vh;
    padding-bottom: 80px;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.screen.active {
    display: block !important;
    opacity: 1;
    transform: translateY(0);
}

/* Login Screen */
#login-screen {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    overflow-y: auto;
}

#login-screen:not(.active) {
    display: none !important;
}

.login-container {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.logo-container {
    margin-bottom: 2rem;
}

.gurke {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.login-container h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

#login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#login-form input {
    padding: 1.2rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--card-bg);
}

#login-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.1);
    transform: translateY(-1px);
}

#login-form button {
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
}

.error-message {
    color: var(--danger-color);
    margin-top: 1rem;
    font-size: 0.9rem;
    display: none;
}

.error-message.show {
    display: block;
}

/* Header */
header {
    background: var(--card-bg);
    padding: 1rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.btn-icon {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.8rem;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-icon:hover {
    background: var(--bg-color);
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-icon:active {
    transform: scale(0.95);
}

.btn-logout {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: white;
    border: none;
    padding: 0.7rem 1.2rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    white-space: nowrap;
}

.btn-logout:hover {
    background: linear-gradient(135deg, #ee5a6f, #ff6b6b);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.btn-logout:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.3);
}

.btn-logout span:first-child {
    font-size: 1.2rem;
}

/* Main Content */
main {
    padding: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.card h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 1.2rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    margin-top: 1rem;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    margin: 0.5rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: var(--bg-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary:active {
    transform: translateY(0);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #d32f2f);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #d32f2f, var(--danger-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.4);
}

.btn-danger:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

.btn-small {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    margin: 0.2rem;
    font-weight: 500;
    width: auto !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Teilnehmer Liste */
.teilnehmer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    margin: 0.5rem 0;
    background: var(--bg-color);
    border-radius: 8px;
}

.teilnehmer-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.status-angemeldet {
    background: #ffc107;
    color: #333;
}

.status-bestaetigt {
    background: var(--primary-color);
    color: white;
}

.checkmark {
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Kosten */
.kosten-info {
    margin-bottom: 1rem;
}

.kosten-summary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    font-size: 1.1rem;
}

.kosten-summary strong {
    display: block;
    font-size: 2rem;
    margin-top: 0.5rem;
}

.kosten-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem;
    margin: 0.5rem 0;
    background: var(--bg-color);
    border-radius: 8px;
}

/* Ideen Liste */
.idee-item, .kommentar-item {
    background: var(--bg-color);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    position: relative;
}

.idee-item.decision-approved {
    border-left-color: #4CAF50;
    background: rgba(76, 175, 80, 0.08);
}

.idee-item.decision-rejected {
    border-left-color: #f44336;
    background: rgba(244, 67, 54, 0.08);
}

.decision-banner {
    position: absolute;
    top: -12px;
    right: 16px;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.decision-banner.approved {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

.decision-banner.rejected {
    background: linear-gradient(135deg, #f44336, #d32f2f);
}

.decision-final-text {
    font-weight: 700;
    font-size: 1rem;
}

.decision-final-text.approved {
    color: #2e7d32;
}

.decision-final-text.rejected {
    color: #c62828;
}

.idee-header, .kommentar-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.idee-meta, .kommentar-meta {
    font-size: 0.85rem;
    color: #666;
}

.idee-kategorie {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-right: 0.5rem;
}

.kategorie-essen {
    background: #ff9800;
    color: white;
}

.kategorie-trinken {
    background: #2196F3;
    color: white;
}

.kategorie-sonstiges {
    background: #9c27b0;
    color: white;
}

.idee-beschreibung, .kommentar-text {
    margin: 0.8rem 0;
    line-height: 1.6;
}

.idee-footer, .kommentar-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border-color);
}

.vote-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.vote-btn {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.4rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-width: 60px;
    justify-content: center;
}

.vote-btn:hover {
    transform: scale(1.15) translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.vote-btn:active {
    transform: scale(1.05);
}

.vote-btn.up {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.vote-btn.up.active {
    background: var(--primary-color);
    color: white;
}

.vote-btn.down {
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.vote-btn.down.active {
    background: var(--danger-color);
    color: white;
}

.vote-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.vote-score {
    font-weight: bold;
    color: var(--text-color);
    min-width: 30px;
    text-align: center;
}

.admin-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.admin-decision-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.decision-status-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.decision-status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(0,0,0,0.05);
}

.decision-status-badge.open {
    color: #6b7280;
}

.decision-status-badge.approved {
    background: rgba(76,175,80,0.15);
    color: #2e7d32;
}

.decision-status-badge.rejected {
    background: rgba(244,67,54,0.15);
    color: #c62828;
}

.decision-status-info {
    font-size: 0.85rem;
    color: #f57c00;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background-color: var(--card-bg);
    margin: auto;
    padding: 2rem;
    border-radius: 15px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 1rem;
}

.close:hover {
    color: var(--text-color);
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-content input,
.modal-content select,
.modal-content textarea {
    padding: 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.modal-content input:focus,
.modal-content select:focus,
.modal-content textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.modal-content textarea {
    min-height: 100px;
    resize: vertical;
}

.name-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.name-input {
    flex: 1;
}

.btn-remove-name {
    background: linear-gradient(135deg, var(--danger-color), #d32f2f);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

.btn-remove-name:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}

.btn-remove-name:active {
    transform: scale(0.95);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.inline-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.inline-form input {
    flex: 1;
}

/* Footer */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    padding: 1rem;
    text-align: center;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
}

footer a {
    display: none;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s;
}

#admin-link.admin-visible {
    display: inline-flex;
}

footer a:hover {
    color: var(--primary-color);
    background: var(--bg-color);
}

/* Summary */
.summary-card {
    background: radial-gradient(circle at top, rgba(76,175,80,0.08), transparent), var(--card-bg);
    border: 1px solid rgba(76,175,80,0.15);
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.summary-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.3rem;
}

.summary-pill {
    background: rgba(76,175,80,0.1);
    color: var(--primary-color);
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.summary-item {
    background: var(--bg-color);
    padding: 1rem 1.2rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.3);
}

.summary-item span {
    font-size: 0.85rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.summary-item strong {
    font-size: 1.8rem;
    color: var(--text-color);
    font-weight: 700;
}

.summary-item small {
    color: #6b7280;
}

/* Responsive */
@media (min-width: 768px) {
    .inline-form {
        flex-direction: row;
    }
    
    .vote-buttons {
        gap: 1rem;
    }
}

/* Loading State */
.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: #999;
    font-style: italic;
}

