:root {
    --primary-color: #0a8edc;
    --primary-hover: #087bbd;
    --bg-dark: #050a14;
    --bg-card: rgba(15, 23, 42, 0.6);
    --bg-nav: rgba(5, 10, 20, 0.8);
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --success: #10b981;
    --error: #f43f5e;
    --warning: #f59e0b;
    --border-color: rgba(255, 255, 255, 0.08);
    
    /* Rank Colors */
    --rank-owner: #aa0000;
    --rank-admin: #ff5555;
    --rank-developer: #55ffff;
    --rank-moderator: #55ff55;
    --rank-supporter: #ffff55;
    --rank-tsupporter: #ffff55;
    --rank-creator: #aa00aa;
    --rank-builder: #5555ff;
    --rank-content: #ff55ff;
    --rank-funity: #ffaa00;
    --rank-platin: #33ccff;
    --rank-titan: #0000aa;
    --rank-elite: #00aa00;
    --rank-saphir: #0000ff;
    --rank-rubin: #880000;
    --rank-premium: #ffaa00;
    --rank-spieler: #aaaaaa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(10, 142, 220, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(10, 142, 220, 0.05) 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header / Logo */
.site-header {
    width: 100%;
    padding: 3rem 0 0;
    text-align: center;
    position: relative;
    z-index: 1001;
    background: #050a14; /* Identical to nav/body for seamless transition */
}

.main-logo {
    max-width: 260px;
    width: 75%;
    filter: drop-shadow(0 0 40px rgba(10, 142, 220, 0.4));
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 0; /* Adjusted for seamless look */
}

.main-logo:hover {
    transform: scale(1.03);
    filter: drop-shadow(0 0 50px rgba(10, 142, 220, 0.5));
}

/* Navigation - Opsucht Style */
nav {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.2rem 0.75rem 1.2rem;
    background: #050a14; /* Solid background for seamless merge */
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.6rem 1.2rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

nav a.active {
    color: var(--primary-color);
    background: rgba(10, 142, 220, 0.1);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    min-height: 60vh;
}

/* Cards - Modern & Clean */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 1.25rem;
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-8px);
    border-color: rgba(10, 142, 220, 0.3);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6);
}

/* Buttons */
.btn {
    padding: 0.9rem 1.8rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    letter-spacing: 0.02em;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 8px 20px -6px rgba(10, 142, 220, 0.5);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 25px -8px rgba(10, 142, 220, 0.6);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

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

input[type="text"],
input[type="email"],
input[type="password"],
select {
    width: 100%;
    padding: 0.9rem 1.2rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    padding-right: 3rem;
    cursor: pointer;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(10, 142, 220, 0.05);
    box-shadow: 0 0 0 4px rgba(10, 142, 220, 0.1);
}

/* Rank Badges */
.rank {
    padding: 0.35rem 1rem;
    border-radius: 0.6rem;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
}

/* Shop Items */
.shop-item-img {
    width: 140px;
    height: 140px;
    object-fit: contain;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 8px 15px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.card:hover .shop-item-img {
    transform: scale(1.1) rotate(5deg);
}

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

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(10, 142, 220, 0.4); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(10, 142, 220, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(10, 142, 220, 0); }
}

.fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.slide-in {
    animation: slideInRight 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.streak-card:not([disabled]) .btn-primary {
    animation: pulse 2s infinite;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 5px;
    border: 2px solid var(--bg-dark);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--border-color);
    padding: 5rem 2rem;
    text-align: center;
}

footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

footer a {
    transition: color 0.3s ease;
}

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

/* Dashboard Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 2rem 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    /* Navigation Mobile */
    nav {
        overflow-x: auto;
        justify-content: flex-start;
        padding: 1rem 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 0.75rem;
    }

    nav::-webkit-scrollbar {
        display: none;
    }

    nav a {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        white-space: nowrap;
        flex-shrink: 0;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid var(--border-color);
    }

    /* Hero / Header Mobile */
    .site-header {
        padding: 2.5rem 0 1rem;
    }

    .main-logo {
        max-width: 200px;
    }

    h1 {
        font-size: 1.75rem;
        text-align: center;
    }

    .hero p {
        font-size: 1rem;
        text-align: center;
    }

    .hero .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .hero div[style*="display: flex"] {
        flex-direction: column;
        gap: 0.75rem !important;
    }

    /* Dashboard Mobile Order */
    .dashboard-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 2.5rem !important; /* Deutlicher Abstand zwischen Profilkarte und Streak */
    }

    aside {
        order: 1; /* Profilkarte an zweiter Stelle (nach Begrüßung) */
    }

    section {
        order: 2; /* Streak an dritter Stelle */
        display: flex;
        flex-direction: column;
        gap: 2.5rem; /* Abstand zwischen Streak-Karte und den Stats darunter */
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .streak-card {
        padding: 1.5rem !important;
    }

    #streak-count {
        font-size: 3rem !important;
    }

    /* Grid Layouts Mobile */
    .features, #shop-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* Newsletter Mobile */
    #newsletter-form {
        flex-direction: column;
        gap: 1rem !important;
    }

    #newsletter-form input, 
    #newsletter-form button {
        width: 100% !important;
    }

    /* Shop Mobile */
    .shop-header {
        flex-direction: column;
        text-align: center !important;
        gap: 1.5rem;
    }

    .shop-header div {
        text-align: center !important;
    }

    /* Admin Table Mobile */
    table {
        display: block;
        overflow-x: auto;
    }

    .tab-btn {
        padding: 0.75rem 1rem !important;
        font-size: 0.85rem;
        flex: 1;
        text-align: center;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.5rem; }
    .card { padding: 1.25rem; }
    .btn { padding: 0.8rem 1.2rem; font-size: 0.9rem; }
}
