/* Apple-Style Design System */
:root {
    --bg-primary: #000000;
    --bg-secondary: #1d1d1f;
    --bg-tertiary: #2d2d2d;
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --accent: #2997ff;
    --accent-hover: #0077ed;
    --gradient-start: #1d1d1f;
    --gradient-end: #000000;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 22px;
    height: 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 21px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.welcome {
    font-size: 14px;
    color: var(--text-secondary);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 400;
    border-radius: 980px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
}

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

.btn-login:hover {
    background: var(--accent-hover);
    transform: scale(1.02);
}

.btn-logout {
    background: transparent;
    color: var(--accent);
}

.btn-logout:hover {
    color: var(--accent-hover);
}

/* Main Content */
main {
    padding-top: 48px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 120px 24px;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(41, 151, 255, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-eyebrow {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.hero h1 {
    font-size: clamp(48px, 10vw, 96px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 24px;
    padding-bottom: 4px;
    background: linear-gradient(180deg, #ffffff 0%, #a1a1a6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: clamp(19px, 3vw, 28px);
    font-weight: 400;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.4;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    background: var(--accent);
    color: white;
    padding: 12px 28px;
    font-size: 17px;
    font-weight: 400;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--accent);
    padding: 12px 28px;
    font-size: 17px;
    font-weight: 400;
}

.btn-secondary:hover {
    text-decoration: underline;
}

/* Sections */
.section {
    padding: 100px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-dark {
    background: var(--bg-secondary);
}

.section-title {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 600;
    letter-spacing: -0.02em;
    text-align: center;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 21px;
    color: var(--text-secondary);
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

/* Treffen Cards */
.treffen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.treffen-card {
    background: var(--bg-tertiary);
    border-radius: 20px;
    padding: 32px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.treffen-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.treffen-card h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
}

.treffen-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.treffen-date {
    font-size: 17px;
    color: var(--accent);
    font-weight: 500;
}

.treffen-location {
    font-size: 15px;
    color: var(--text-secondary);
}

.no-treffen {
    text-align: center;
    padding: 80px 24px;
    color: var(--text-secondary);
    font-size: 19px;
}

.no-treffen-icon {
    font-size: 48px;
    margin-bottom: 24px;
    opacity: 0.5;
}

/* Footer */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 24px;
    text-align: center;
}

footer p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Login Form */
.form-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 24px;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.form-container {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 48px 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-container h2 {
    font-size: 32px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.form-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 17px;
}

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

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

.form-group input {
    width: 100%;
    padding: 14px 16px;
    font-size: 17px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(41, 151, 255, 0.2);
}

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

.btn-submit {
    width: 100%;
    padding: 14px 24px;
    font-size: 17px;
    font-weight: 500;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    font-family: inherit;
    margin-top: 8px;
}

.btn-submit:hover {
    background: var(--accent-hover);
    transform: scale(1.01);
}

.btn-submit:active {
    transform: scale(0.99);
}

.error {
    background: rgba(255, 59, 48, 0.15);
    border: 1px solid rgba(255, 59, 48, 0.3);
    color: #ff453a;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    text-align: center;
    font-size: 14px;
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 24px;
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    header .container {
        padding: 0 16px;
    }
    
    .hero {
        padding: 80px 16px;
    }
    
    .section {
        padding: 60px 16px;
    }
    
    .form-container {
        padding: 32px 24px;
    }
}

/* User Dropdown Menu */
.user-menu {
    position: relative;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s ease;
    font-family: inherit;
}

.user-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-menu-toggle::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--text-secondary);
    transition: transform 0.2s ease;
}

.user-menu.open .user-menu-toggle::after {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: rgba(29, 29, 31, 0.95);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 1001;
}

.user-menu.open .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-header {
    display: block;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
    transition: background 0.15s ease;
    cursor: pointer;
}

.user-dropdown-header:hover {
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.user-dropdown-header .user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-dropdown-header .user-email {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.user-dropdown-item {
    display: block;
    width: 100%;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--text-primary);
    text-decoration: none;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease;
    font-family: inherit;
}

.user-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-dropdown-item.danger {
    color: #ff453a;
}

.user-dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 8px 0;
}

/* Admin Button & Badge */
.btn-admin {
    background: rgba(255, 149, 0, 0.15);
    color: #ff9500;
    padding: 6px 14px;
    font-size: 13px;
    border: 1px solid rgba(255, 149, 0, 0.3);
}

.btn-admin:hover {
    background: rgba(255, 149, 0, 0.25);
}

.admin-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ff9500 0%, #ff6b00 100%);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Admin Panel Styles */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 24px 40px;
}

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

.admin-header h1 {
    font-size: 34px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.btn-add {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.btn-add:hover {
    background: var(--accent-hover);
}

.btn-add::before {
    content: '+';
    font-size: 18px;
    font-weight: 400;
}

/* Users Table */
.users-table {
    width: 100%;
    background: var(--bg-secondary);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

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

.users-table th {
    background: rgba(0, 0, 0, 0.3);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.users-table td {
    font-size: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.users-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.user-role {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.user-role.admin {
    background: rgba(255, 149, 0, 0.15);
    color: #ff9500;
}

.user-role.user {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.table-actions {
    display: flex;
    gap: 8px;
}

.btn-edit,
.btn-delete {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.btn-edit {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-edit:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-delete {
    background: rgba(255, 59, 48, 0.15);
    color: #ff3b30;
}

.btn-delete:hover {
    background: rgba(255, 59, 48, 0.25);
}

/* Admin Form */
.admin-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-form h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.admin-form .form-subtitle {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent);
}

.checkbox-group label {
    font-size: 15px;
    color: var(--text-primary);
    cursor: pointer;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .users-table {
        overflow-x: auto;
    }
    
    .users-table table {
        min-width: 600px;
    }
}

/* Notification Badge für ungelesene Nachrichten */
.user-dropdown-item {
    position: relative;
}
.notification-badge {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #ff3b30;
    color: white;
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(255, 59, 48, 0.4);
}

.user-dropdown-header .notification-badge {
    position: static;
    transform: none;
    margin-left: 4px;
}

/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */

/* Mobile Menu Toggle (Hamburger) */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    margin-left: 8px;
}

.mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 1px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 48px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 999;
    padding: 20px;
    overflow-y: auto;
}

.mobile-nav-overlay.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.mobile-nav-overlay a,
.mobile-nav-overlay button {
    display: block;
    width: 100%;
    padding: 16px 20px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 17px;
    border: none;
    background: transparent;
    text-align: left;
    border-radius: 12px;
    margin-bottom: 4px;
    font-family: inherit;
    cursor: pointer;
}

.mobile-nav-overlay a:hover,
.mobile-nav-overlay button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-nav-overlay .nav-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-overlay .nav-section:last-child {
    border-bottom: none;
}

.mobile-nav-overlay .nav-section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 20px;
    margin-bottom: 8px;
}

.mobile-nav-overlay .btn-admin {
    background: rgba(255, 149, 0, 0.15);
    color: #ff9500;
    border: 1px solid rgba(255, 149, 0, 0.3);
}

.mobile-nav-overlay .danger {
    color: #ff453a;
}

.mobile-nav-overlay .notification-badge {
    position: static;
    display: inline-flex;
    transform: none;
    margin-left: 8px;
}

/* ============================================
   TABLET BREAKPOINT (max-width: 1024px)
   ============================================ */
@media (max-width: 1024px) {
    .admin-container {
        padding: 80px 20px 40px;
    }

    .admin-header h1 {
        font-size: 28px;
    }

    .section {
        padding: 60px 20px;
    }

    .section-subtitle {
        font-size: 18px;
        margin-bottom: 40px;
    }
}

/* ============================================
   MOBILE BREAKPOINT (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    /* Header */
    header .container {
        padding: 0 12px;
        height: 56px;
    }

    .logo {
        font-size: 18px;
    }

    /* Hide desktop nav, show mobile toggle */
    nav .btn-admin {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    /* Main content padding for taller mobile header */
    main {
        padding-top: 56px;
    }

    /* Hero Section */
    .hero {
        min-height: auto;
        padding: 60px 16px 80px;
    }

    .hero::before {
        width: 400px;
        height: 400px;
    }

    .hero-eyebrow {
        font-size: 14px;
    }

    .hero p {
        font-size: 16px;
        margin-bottom: 32px;
    }

    .hero-cta {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }

    .btn-primary,
    .btn-secondary {
        padding: 14px 24px;
        font-size: 16px;
    }

    /* Sections */
    .section {
        padding: 40px 16px;
    }

    .section-title {
        font-size: 28px;
        margin-bottom: 12px;
    }

    .section-subtitle {
        font-size: 16px;
        margin-bottom: 32px;
    }

    /* Treffen Grid */
    .treffen-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .treffen-card {
        padding: 20px;
        border-radius: 16px;
    }

    .treffen-card:hover {
        transform: none;
    }

    /* Forms */
    .form-wrapper {
        padding: 70px 16px 40px;
    }

    .form-container {
        padding: 24px 20px;
        border-radius: 20px;
    }

    .form-container h2 {
        font-size: 26px;
    }

    .form-subtitle {
        font-size: 15px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px;
        padding: 14px 14px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .btn-submit {
        padding: 16px 24px;
        font-size: 16px;
    }

    /* User Dropdown - Mobile Optimized */
    .user-menu {
        position: static;
    }

    .user-dropdown {
        position: fixed !important;
        top: 56px !important;
        left: 0 !important;
        right: 0 !important;
        bottom: auto !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: calc(100vh - 56px) !important;
        border-radius: 0 !important;
        overflow-y: auto !important;
        z-index: 9999 !important;
        background: #1d1d1f !important;
        border: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8) !important;
        padding: 0 !important;
    }

    .user-menu .user-dropdown {
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
    }

    .user-menu.open .user-dropdown {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
    }

    .user-dropdown-header {
        padding: 20px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    }

    .user-dropdown-item {
        padding: 16px 20px !important;
        font-size: 16px !important;
        min-height: 50px !important;
        display: flex !important;
        align-items: center !important;
    }

    .user-dropdown-divider {
        margin: 8px 0 !important;
    }

    /* Admin Styles */
    .admin-container {
        padding: 70px 16px 40px;
    }

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

    .admin-header h1 {
        font-size: 24px;
    }

    .btn-add {
        width: 100%;
        justify-content: center;
    }

    /* Tables */
    .users-table {
        border-radius: 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .users-table table {
        min-width: 500px;
    }

    .users-table th,
    .users-table td {
        padding: 12px 14px;
        font-size: 14px;
    }

    .table-actions {
        flex-direction: column;
        gap: 6px;
    }

    .btn-edit,
    .btn-delete {
        padding: 8px 12px;
        text-align: center;
    }

    /* Admin Form */
    .admin-form {
        padding: 24px 20px;
        border-radius: 16px;
    }

    .admin-form h2 {
        font-size: 22px;
    }

    /* Footer */
    footer {
        padding: 16px;
    }

    footer p {
        font-size: 11px;
    }

    /* No Treffen */
    .no-treffen {
        padding: 40px 16px;
        font-size: 16px;
    }

    .no-treffen-icon {
        font-size: 40px;
    }
}

/* ============================================
   SMALL MOBILE BREAKPOINT (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
    .logo {
        font-size: 16px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero p {
        font-size: 15px;
    }

    .section-title {
        font-size: 24px;
    }

    .treffen-card {
        padding: 16px;
    }

    .form-container {
        padding: 20px 16px;
    }

    .form-container h2 {
        font-size: 22px;
    }

    .admin-header h1 {
        font-size: 20px;
    }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn,
    .btn-primary,
    .btn-secondary,
    .btn-submit,
    .btn-add,
    .btn-edit,
    .btn-delete,
    .nav-btn {
        min-height: 44px;
    }

    .user-dropdown-item {
        min-height: 48px;
    }

    /* Remove hover effects on touch devices */
    .treffen-card:hover {
        transform: none;
        box-shadow: none;
    }

    .btn:hover,
    .btn-primary:hover,
    .btn-secondary:hover {
        transform: none;
    }

    /* Active states for touch feedback */
    .btn:active,
    .btn-primary:active,
    .btn-secondary:active,
    .user-dropdown-item:active {
        opacity: 0.7;
    }
}

/* ============================================
   LANDSCAPE MODE ON MOBILE
   ============================================ */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 40px 16px 60px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .user-dropdown {
        max-height: calc(100vh - 56px);
    }
}

/* ============================================
   SAFE AREA INSETS (for iPhone X and later)
   ============================================ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    footer {
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }

    .mobile-nav-overlay {
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
    }

    .user-dropdown {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* ============================================
   PAGE LOADING BAR
   ============================================ */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.page-loader.active {
    opacity: 1;
}

.page-loader-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), #00d4ff, var(--accent));
    background-size: 200% 100%;
    animation: page-loader-shimmer 1.5s ease-in-out infinite;
    transition: width 0.3s ease-out;
    box-shadow: 0 0 10px var(--accent), 0 0 5px var(--accent);
}

.page-loader.active .page-loader-bar {
    animation: page-loader-progress 2s ease-out forwards, page-loader-shimmer 1.5s ease-in-out infinite;
}

.page-loader.complete .page-loader-bar {
    width: 100% !important;
    transition: width 0.2s ease-out;
}

@keyframes page-loader-progress {
    0% { width: 0%; }
    20% { width: 25%; }
    50% { width: 50%; }
    80% { width: 75%; }
    95% { width: 90%; }
    100% { width: 90%; }
}

@keyframes page-loader-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   SKELETON LOADING ANIMATIONS
   ============================================ */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, rgba(255,255,255,0.08) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, rgba(255,255,255,0.08) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.skeleton-text {
    height: 14px;
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, rgba(255,255,255,0.08) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
    margin: 8px 12px;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

.skeleton-button {
    height: 32px;
    margin: 8px 12px 12px;
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, rgba(255,255,255,0.08) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 6px;
}

/* Skeleton for table rows */
.skeleton-row {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.skeleton-row .skeleton-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    margin-right: 12px;
    flex-shrink: 0;
}

.skeleton-row .skeleton-content {
    flex: 1;
    display: flex;
    gap: 20px;
}

.skeleton-row .skeleton-cell {
    height: 16px;
    border-radius: 4px;
}

.skeleton-row .skeleton-cell.name { width: 200px; }
.skeleton-row .skeleton-cell.year { width: 50px; }
.skeleton-row .skeleton-cell.players { width: 80px; }
.skeleton-row .skeleton-cell.owners { width: 120px; }
