/* Liquid Glass Design System - Feuerwehr-Challenge NRW */
/* Color Palette */
:root {
    --ff-red: #D32F2F;
    --ff-red-light: #FF5252;
    --ff-red-dark: #B71C1C;
    --ff-red-glow: rgba(211, 47, 47, 0.4);
    
    --bg-dark: #0a0a0a;
    --bg-darker: #050505;
    --bg-card: rgba(20, 20, 20, 0.6);
    
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-bg-light: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-border-hover: rgba(255, 255, 255, 0.25);
    
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    
    --success: #4CAF50;
    --warning: #FF9800;
    --error: #f44336;
    --info: #2196F3;
    
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 30px;
    --radius-xl: 40px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px var(--ff-red-glow);
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    background-image: 
        radial-gradient(ellipse at 20% 20%, rgba(211, 47, 47, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(211, 47, 47, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(30, 30, 30, 1) 0%, var(--bg-darker) 100%);
    background-attachment: fixed;
}

/* Glass Card Component */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.glass:hover {
    background: var(--glass-bg-light);
    border-color: var(--glass-border-hover);
}

/* Enhanced Glass with Glow */
.glass-glow {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.glass-glow:hover {
    background: var(--glass-bg-light);
    border-color: rgba(211, 47, 47, 0.4);
    box-shadow: var(--shadow-glow), var(--shadow-md);
}

/* Card Component */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all var(--transition-normal);
}

.card:hover {
    background: var(--glass-bg-light);
    border-color: var(--glass-border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card-glow:hover {
    border-color: rgba(211, 47, 47, 0.4);
    box-shadow: var(--shadow-glow), var(--shadow-md);
}

/* Button Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    backdrop-filter: blur(10px);
}

.btn:hover {
    background: var(--glass-bg-light);
    border-color: var(--glass-border-hover);
    transform: translateY(-1px);
}

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

.btn-primary:hover {
    background: var(--ff-red-light);
    border-color: var(--ff-red-light);
    box-shadow: 0 4px 20px rgba(211, 47, 47, 0.4);
}

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

.btn-secondary:hover {
    border-color: var(--ff-red);
    color: var(--ff-red-light);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Form Components */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    backdrop-filter: blur(10px);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    background: var(--glass-bg-light);
    border-color: var(--ff-red);
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.2);
}

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

.form-select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%23D32F2F' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 20px;
    padding-right: 3rem;
    font-weight: 500;
}

.form-select:hover {
    border-color: var(--ff-red);
    background-color: var(--glass-bg-light);
}

.form-select:focus {
    border-color: var(--ff-red);
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.2);
}

.form-select option {
    background: var(--bg-dark);
    color: var(--text-primary);
    padding: 0.75rem;
    font-size: 1rem;
}

.form-select optgroup {
    background: var(--bg-darker);
    color: var(--ff-red-light);
    font-weight: 600;
}

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

/* Input with Icon */
.form-input-icon {
    position: relative;
}

.form-input-icon .form-input {
    padding-left: 2.75rem;
}

.form-input-icon .icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Alert Components */
.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border-radius: var(--radius-md);
}

.alert-success {
    background: rgba(76, 175, 80, 0.15);
    border-color: rgba(76, 175, 80, 0.3);
    color: #81C784;
}

.alert-error {
    background: rgba(244, 67, 54, 0.15);
    border-color: rgba(244, 67, 54, 0.3);
    color: #E57373;
}

.alert-warning {
    background: rgba(255, 152, 0, 0.15);
    border-color: rgba(255, 152, 0, 0.3);
    color: #FFB74D;
}

.alert-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.alert-message {
    flex: 1;
}

.alert-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

.alert-close:hover {
    opacity: 1;
}

/* Badge Component */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius-full);
}

.badge-red {
    background: rgba(211, 47, 47, 0.2);
    color: var(--ff-red-light);
    border: 1px solid rgba(211, 47, 47, 0.3);
}

.badge-green {
    background: rgba(76, 175, 80, 0.2);
    color: var(--success);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.badge-blue {
    background: rgba(33, 150, 243, 0.2);
    color: var(--info);
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.badge-orange {
    background: rgba(255, 152, 0, 0.2);
    color: var(--warning);
    border: 1px solid rgba(255, 152, 0, 0.3);
}

/* Points Badge */
.points-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.875rem;
    background: var(--ff-red);
    color: white;
    font-weight: 600;
    border-radius: var(--radius-full);
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.3);
}

/* Rank Badge */
.rank-1 {
    background: linear-gradient(135deg, #FFD700, #FFA000);
    color: #000;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.rank-2 {
    background: linear-gradient(135deg, #C0C0C0, #9E9E9E);
    color: #000;
}

.rank-3 {
    background: linear-gradient(135deg, #CD7F32, #8D6E63);
    color: #fff;
}

/* Table Component */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

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

.table th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    background: var(--glass-bg);
}

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

.table tr:hover td {
    background: var(--glass-bg-light);
}

/* Grid System */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(211, 47, 47, 0.3); }
    50% { box-shadow: 0 0 40px rgba(211, 47, 47, 0.5); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--ff-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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