/* NetzKiste Modern Urban Design System */
/* Einheitliches Design für alle Bereiche mit Lila-Akzenten */

/* CSS Custom Properties */
:root {
    /* Primary Colors - Lila Palette */
    --primary-50: #f3f0ff;
    --primary-100: #e9e5ff;
    --primary-200: #d6ceff;
    --primary-300: #b8a6ff;
    --primary-400: #9575ff;
    --primary-500: #684FA3;
    --primary-600: #5a4490;
    --primary-700: #4c3a7d;
    --primary-800: #3e2f6a;
    --primary-900: #302457;
    
    /* Neutral Colors - Urban Grays */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Dark Theme Colors */
    --dark-bg: #0a0a0a;
    --dark-surface: #111111;
    --dark-surface-elevated: #1a1a1a;
    --dark-border: #2a2a2a;
    --dark-text: #ffffff;
    --dark-text-secondary: #a1a1aa;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --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);
    --shadow-glow: 0 0 20px rgba(104, 79, 163, 0.3);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

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

body {
    background-color: var(--dark-bg);
    color: var(--dark-text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    font-size: 1rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark-text);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    color: var(--dark-text-secondary);
    margin-bottom: var(--space-md);
}

/* Links */
a {
    color: var(--primary-400);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: rgba(184, 166, 255, 0.8);
    text-shadow: 0 0 8px rgba(184, 166, 255, 0.3);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: linear-gradient(135deg, rgba(104, 79, 163, 0.9), rgba(90, 68, 144, 0.9));
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
    backdrop-filter: blur(10px);
}

.btn-secondary {
    background: var(--dark-surface-elevated);
    color: var(--dark-text);
    border: 1px solid var(--dark-border);
}

.btn-secondary:hover {
    background: var(--dark-border);
    border-color: var(--primary-500);
}

.btn-ghost {
    background: transparent;
    color: var(--dark-text-secondary);
    border: 1px solid transparent;
}

.btn-ghost:hover {
    background: var(--dark-surface);
    color: var(--dark-text);
}

.btn-lg {
    padding: var(--space-md) var(--space-xl);
    font-size: 1rem;
}

.btn-sm {
    padding: var(--space-xs) var(--space-md);
    font-size: 0.75rem;
}

/* Cards */
.card {
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
}

.card:hover {
    border-color: rgba(104, 79, 163, 0.6);
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(5px);
}

.card-header {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--dark-border);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: var(--space-xs);
}

.card-subtitle {
    color: var(--dark-text-secondary);
    font-size: 0.875rem;
}

/* Forms */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: var(--space-sm);
}

.form-input {
    width: 100%;
    padding: var(--space-md);
    background: var(--dark-surface-elevated);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-md);
    color: var(--dark-text);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(104, 79, 163, 0.1);
}

.form-input::placeholder {
    color: var(--dark-text-secondary);
}

.form-select {
    width: 100%;
    padding: var(--space-md);
    background: var(--dark-surface-elevated);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-md);
    color: var(--dark-text);
    font-size: 1rem;
    cursor: pointer;
}

.form-textarea {
    width: 100%;
    padding: var(--space-md);
    background: var(--dark-surface-elevated);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-md);
    color: var(--dark-text);
    font-size: 1rem;
    resize: vertical;
    min-height: 120px;
}

/* Navigation */
.nav {
    background: var(--dark-surface);
    border-bottom: 1px solid var(--dark-border);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-400);
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    list-style: none;
}

.nav-links a {
    color: var(--dark-text-secondary);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.nav-links a:hover {
    color: rgba(149, 117, 255, 0.8);
    text-shadow: 0 0 8px rgba(149, 117, 255, 0.3);
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--dark-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.table th {
    background: var(--dark-surface-elevated);
    color: var(--dark-text);
    font-weight: 600;
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--dark-border);
}

.table td {
    padding: var(--space-md);
    border-bottom: 1px solid var(--dark-border);
    color: var(--dark-text-secondary);
}

.table tr:hover {
    background: var(--dark-surface-elevated);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all var(--transition-fast);
}

.badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.1);
}

.badge-success:hover {
    background: rgba(34, 197, 94, 0.2);
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.2);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.1);
}

.badge-warning:hover {
    background: rgba(245, 158, 11, 0.2);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
}

.badge-error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.1);
}

.badge-error:hover {
    background: rgba(239, 68, 68, 0.2);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}

.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.1);
}

.badge-info:hover {
    background: rgba(59, 130, 246, 0.2);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

/* Alerts */
.alert {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    border: 1px solid;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

/* Layout */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.section {
    padding: var(--space-3xl) 0;
}

.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

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

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

/* Spacing */
.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

.p-xs { padding: var(--space-xs); }
.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }
.p-2xl { padding: var(--space-2xl); }

/* Text */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

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

.text-primary { color: var(--primary-400); }
.text-secondary { color: var(--dark-text-secondary); }
.text-muted { color: var(--gray-500); }

/* Utilities */
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: 9999px; }

.shadow { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

/* Responsive */
@media (max-width: 768px) {
    .nav {
        top: 10px !important;
        width: 95% !important;
        position: fixed !important;
        z-index: 1000 !important;
    }
    
    .nav-content {
        padding: 12px 20px !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
        background: rgba(26, 26, 46, 0.95) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-radius: 20px !important;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25) !important;
    }
    
    .nav-links {
        display: none !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        background: rgba(26, 26, 46, 0.98) !important;
        backdrop-filter: blur(15px) !important;
        -webkit-backdrop-filter: blur(15px) !important;
        border-radius: 0 0 20px 20px !important;
        padding: 15px !important;
        flex-direction: column !important;
        gap: 15px !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-top: none !important;
        z-index: 1001 !important;
        margin-top: 5px !important;
    }
    
    .nav-links.show {
        display: flex !important;
    }
    
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: flex !important;
    }
    
    #mobile-menu-toggle {
        display: block !important;
        background: none !important;
        border: none !important;
        color: white !important;
        font-size: 1.5rem !important;
        cursor: pointer !important;
        padding: 8px !important;
        border-radius: 8px !important;
        transition: background-color 0.3s ease !important;
    }
    
    #mobile-menu-toggle:hover {
        background: rgba(255, 255, 255, 0.1) !important;
    }
    
    .container {
        padding: 0 var(--space-md);
    }
    
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    /* Ensure body has proper padding for fixed nav */
    body {
        padding-top: 80px !important;
    }
}

/* Extra Small Devices (480px and down) */
@media (max-width: 480px) {
    .nav {
        width: 98% !important;
        top: 5px !important;
    }
    
    .nav-content {
        padding: 8px 15px !important;
    }
    
    .container {
        padding: 0 var(--space-sm);
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.125rem; }
    
    /* Form inputs should be at least 16px to prevent zoom on iOS */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    textarea,
    select {
        font-size: 16px !important;
    }
    
    /* Buttons should be touch-friendly */
    .btn,
    button {
        min-height: 44px !important;
        padding: 12px 16px !important;
    }
    
    /* Ensure proper spacing for touch targets */
    .nav-link {
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
    }
}

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

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease-out;
}

.animate-slideIn {
    animation: slideIn 0.3s ease-out;
}

/* Focus States */
*:focus {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: var(--primary-500);
    color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-surface);
}

::-webkit-scrollbar-thumb {
    background: var(--dark-border);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-500);
}