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

:root {
    /* Primary Colors - Hellblau (Sky Blue) */
    --primary: #0EA5E9;
    --primary-hover: #0284C7;
    --primary-dark: #0369A1;
    --primary-light: #E0F2FE;
    --primary-50: #F0F9FF;
    --primary-100: #E0F2FE;
    --primary-200: #BAE6FD;
    --primary-500: #0EA5E9;
    --primary-600: #0284C7;
    --primary-700: #0369A1;

    /* Semantic Colors */
    --success: #10B981;
    --success-light: #D1FAE5;
    --error: #EF4444;
    --error-light: #FEE2E2;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;

    /* Neutral Colors */
    --text-primary: #0C1A2E;
    --text-secondary: #475569;
    --text-tertiary: #94A3B8;
    --text-muted: #CBD5E1;

    /* Background Colors */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F0F9FF;
    --bg-tertiary: #E0F2FE;
    --bg-elevated: #FFFFFF;

    /* Borders */
    --border-light: #BAE6FD;
    --border-medium: #7DD3FC;
    --border-focus: #0EA5E9;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(14, 165, 233, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(14, 165, 233, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(14, 165, 233, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(14, 165, 233, 0.12), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-blue: 0 4px 14px rgba(14, 165, 233, 0.3);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--text-primary);
}

h2 {
    font-size: 1.875rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
    color: var(--text-primary);
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
}

h4 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
}

p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Main Content */
.main-content {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 48px;
    box-shadow: var(--shadow-md);
    max-width: 480px;
    margin: 80px auto;
}

.main-content-wide {
    max-width: 1200px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary);
    color: white;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-xs);
}

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

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

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--border-light);
    border-color: var(--border-medium);
}

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

.btn-success:hover:not(:disabled) {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

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

.btn-danger:hover:not(:disabled) {
    background: #DC2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-medium);
    color: var(--text-primary);
}

.btn-outline:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

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

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-full {
    width: 100%;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.15s ease;
    font-family: inherit;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-100);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Code Input */
.code-input {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Messages */
.message {
    padding: 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    margin: 16px 0;
}

.error-message {
    background: var(--error-light);
    color: var(--error);
    border: 1px solid var(--error);
}

.success-message {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid var(--success);
}

.info-message {
    background: var(--primary-50);
    color: var(--primary);
    border: 1px solid var(--primary-200);
}

/* Cards */
.card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

/* Grid */
.grid {
    display: grid;
    gap: 24px;
}

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

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

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

@media (max-width: 1024px) {

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

@media (max-width: 640px) {

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Event Code Badge */
.event-code-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: var(--primary-50);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    border: 1px solid var(--primary-100);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    margin-bottom: 24px;
}

.modal-header h2 {
    font-size: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 32px;
    background: linear-gradient(135deg, #0EA5E9 0%, #0284C7 100%);
    margin-bottom: 32px;
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.25);
}

.dashboard-header h2,
.dashboard-header * {
    color: white !important;
}

.dashboard-header .btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    color: white !important;
}

.dashboard-header .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
}

.dashboard-header .btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: white !important;
}

.dashboard-header .btn-outline:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
}

.dashboard-nav {
    display: flex;
    gap: 12px;
    align-items: center;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--primary-50);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border: 2px solid var(--primary-100);
}

/* Event Card */
.event-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-light);
    border-left: 3px solid var(--primary);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.event-card:hover {
    border-color: var(--primary);
    border-left-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.event-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.event-card-code {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-weight: 700;
    letter-spacing: 0.1em;
    margin: 12px 0;
}

.event-card-meta {
    color: var(--text-tertiary);
    font-size: 14px;
    margin-top: 12px;
}

.event-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.event-card-quick-actions {
    display: flex;
    gap: 4px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
}

.btn-icon:hover {
    background: var(--primary-50);
    color: var(--primary);
    transform: scale(1.05);
}

.event-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

/* Wordcloud */
.wordcloud-container {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 48px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wordcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: center;
}

.word-item {
    display: inline-block;
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-md);
    font-weight: 600;
    animation: fadeInScale 0.3s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
}

.table thead th {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border-light);
}

.table tbody tr {
    border-bottom: 1px solid var(--border-light);
}

.table tbody tr:hover {
    background: var(--bg-secondary);
}

/* Status Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-error {
    background: var(--error-light);
    color: var(--error);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning);
}

.badge-info,
.badge-primary {
    background: var(--primary-50);
    color: var(--primary);
}

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

.text-muted {
    color: var(--text-tertiary);
}

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

.mt-8 {
    margin-top: 32px;
}

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

.mb-8 {
    margin-bottom: 32px;
}

.p-4 {
    padding: 16px;
}

.p-8 {
    padding: 32px;
}

.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gap-2 {
    gap: 8px;
}

.gap-4 {
    gap: 16px;
}

.gap-6 {
    gap: 24px;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .main-content {
        padding: 32px 24px;
        margin: 24px auto;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .modal-content {
        padding: 24px;
    }

    .event-card-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* Loading */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 64px 24px;
}

.empty-state-icon {
    font-size: 3rem;
    color: var(--text-tertiary);
    margin-bottom: 16px;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state-description {
    color: var(--text-tertiary);
    margin-bottom: 24px;
}

/* Footer Links */
footer a {
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--primary) !important;
    text-decoration: underline;
}