:root {
    --primary-color: #9146ff;
    --primary-gradient: linear-gradient(135deg, #9146ff 0%, #772ce8 100%);
    --bg-dark: #0b0b0d;
    --bg-card: rgba(25, 25, 28, 0.7);
    --bg-card-hover: rgba(35, 35, 40, 0.9);
    --text-main: #f5f5f7;
    --text-muted: #a1a1aa;
    --accent-success: #00f593;
    --accent-error: #ff4a4a;
    --border-color: rgba(255, 255, 255, 0.08);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-strong: 0 10px 40px rgba(0, 0, 0, 0.6);
    --radius-lg: 16px;
    --radius-md: 10px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(145, 70, 255, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 245, 147, 0.03) 0%, transparent 40%);
    color: var(--text-main);
    font-family: var(--font-family);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

#auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.auth-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    padding: 48px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-strong);
    width: 100%;
    max-width: 440px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.auth-card:hover {
    transform: translateY(-4px);
    border-color: rgba(145, 70, 255, 0.3);
}

.auth-card h1 {
    margin-bottom: 12px;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-card p {
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 15px;
}

.btn-twitch {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(145, 70, 255, 0.3);
}

.btn-twitch:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(145, 70, 255, 0.4);
}

.app-header {
    background: rgba(11, 11, 13, 0.8);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px;
    border-radius: 12px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: white;
    background: var(--primary-gradient);
    box-shadow: 0 4px 12px rgba(145, 70, 255, 0.2);
}

.section {
    padding: 48px 0;
    display: none;
    animation: fadeIn 0.4s ease-out;
}

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

.section.active {
    display: block;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
}

.card {
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-subtle);
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: var(--bg-card-hover);
}

.card h2 {
    margin-bottom: 24px;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card h2 i {
    color: var(--primary-color);
}

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

label {
    display: block;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input, select, textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    padding: 14px;
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: inherit;
    font-size: 15px;
    transition: var(--transition);
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 0 4px rgba(145, 70, 255, 0.1);
}

.btn {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    border: none;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary { 
    background: var(--primary-gradient); 
    color: white; 
    box-shadow: 0 4px 12px rgba(145, 70, 255, 0.2);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(145, 70, 255, 0.3); }

.btn-success { 
    background: linear-gradient(135deg, #00f593 0%, #00d17c 100%); 
    color: #0b0b0d; 
}
.btn-success:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 245, 147, 0.2); }

.btn-danger { 
    background: linear-gradient(135deg, #ff4a4a 0%, #e63939 100%); 
    color: white; 
}
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(255, 74, 74, 0.2); }

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-online { background: rgba(0, 245, 147, 0.1); color: var(--accent-success); border: 1px solid rgba(0, 245, 147, 0.2); }
.badge-offline { background: rgba(255, 74, 74, 0.1); color: var(--accent-error); border: 1px solid rgba(255, 74, 74, 0.2); }

/* Table */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th, td {
    padding: 18px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.calendar-wrapper {
    overflow: visible;
    padding: 15px 0;
    margin-bottom: 24px;
}

.calendar-scroll-container {
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.calendar-scroll-container::-webkit-scrollbar {
    height: 6px;
}

.calendar-scroll-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.calendar {
    display: flex;
    gap: 16px;
    min-width: max-content;
    padding: 5px;
}

.calendar-day {
    width: 120px;
    height: 120px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 2px solid var(--border-color); 
    font-size: 13px;
    transition: var(--transition);
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: relative;
}

.calendar-day:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.calendar-day.selected {
    border-color: var(--primary-color);
    background: rgba(145, 70, 255, 0.1);
    box-shadow: 0 0 15px rgba(145, 70, 255, 0.2);
}

.calendar-day.today {
    border-color: var(--accent-success);
}

.calendar-day.today.selected {
    border-color: var(--accent-success); 
    background: rgba(0, 245, 147, 0.05); 
    box-shadow: 0 0 15px rgba(0, 245, 147, 0.1);
}

.calendar-day.today::after {
    content: 'HEUTE';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-success);
    color: #0b0b0d;
    font-size: 9px;
    font-weight: 900;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 245, 147, 0.3);
}

.calendar-day strong {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.shift-tag {
    background: var(--primary-gradient);
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    margin-top: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 2px 8px rgba(145, 70, 255, 0.2);
}

.timeline-container {
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-top: 20px;
    border: 1px solid var(--border-color);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.timeline-grid {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 0;
    position: relative;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.time-slot {
    height: 50px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
    padding-top: 5px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
}

.timeline-content {
    height: 50px;
    border-top: 1px solid var(--border-color);
    position: relative;
}

.timeline-shift {
    position: absolute;
    left: 5px;
    right: 5px;
    background: var(--primary-gradient);
    border-radius: 8px;
    padding: 8px 10px;
    color: white;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(145, 70, 255, 0.3);
    z-index: 2;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    word-break: break-all;
}

.timeline-shift .mod-name { 
    font-size: 13px; 
    margin-bottom: 2px; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    width: 100%;
}
.timeline-shift .time-range { 
    font-size: 10px; 
    opacity: 0.8; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    width: 100%;
}

#notification {
    position: fixed;
    bottom: 32px;
    right: 32px;
    padding: 16px 32px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--primary-color);
    color: white;
    font-weight: 600;
    box-shadow: var(--shadow-strong);
    transform: translateY(200%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
}

#notification.success { border-color: var(--accent-success); }
#notification.error { border-color: var(--accent-error); }

@media (max-width: 1024px) {
    .grid { grid-template-columns: 1fr; }
    .calendar { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .container { padding: 0 16px; }
    .auth-card { padding: 32px; }
    .calendar { grid-template-columns: repeat(2, 1fr); }
    .nav-container { flex-direction: column; gap: 16px; }
    
    .timeline-grid {
        grid-template-columns: 50px 1fr;
    }
    
    .timeline-shift {
        padding: 6px 8px !important;
    }
    
    .timeline-shift .mod-name {
        font-size: 11px !important;
    }
    
    .timeline-shift .time-range {
        font-size: 9px !important;
    }
}
