/* ==========================================================================
   1. Global Theme Styles (CloudSMP Blue Theme)
   ========================================================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    min-height: 100vh;
}

body:has(.zoom-checkbox:checked) {
    overflow: hidden;
}

/* ==========================================================================
   2. Header Bar Styling
   ========================================================================= */
.header-bar {
    background: rgba(44, 82, 130, 0.85); 
    backdrop-filter: blur(4px);
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
}

.site-title {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.header-right .header-link {
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    opacity: 0.9;
}

.header-right .header-link:hover {
    opacity: 1;
}

.btn-logout {
    background: transparent;
    border: 1px solid white;
    color: white;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s, color 0.2s;
}

.btn-logout:hover {
    background: white;
    color: #2b78e4;
}

/* ==========================================================================
   3. Login Page Layout & Highly Animated Pixel/Minecraft Clouds
   ========================================================================= */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 60px;
    min-height: calc(100vh - 60px); 
    background: linear-gradient(to bottom, #a0c4ff, #e8f0fe); 
    position: relative;
    overflow: hidden; 
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 450px;
    position: relative; 
    z-index: 10; 
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-right: 2px;
}

.login-card h1 {
    font-size: 1.75rem;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 0; 
}

.card-logo {
    height: 52px;
    width: auto;
    max-width: 80px;
    object-fit: contain;
    border-radius: 4px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s;
    position: relative;
    z-index: 20;
}

.form-group input:focus {
    outline: none;
    border-color: #2b78e4;
    box-shadow: 0 0 0 2px rgba(43, 120, 228, 0.2);
}

.form-options {
    margin-bottom: 20px;
    text-align: left;
}

.forgot-password {
    font-size: 0.85rem;
    color: #2b78e4;
    text-decoration: none;
}

.forgot-password:hover {
    text-decoration: underline;
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-login {
    background-color: #2b78e4;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 0.95rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
    position: relative;
    z-index: 20;
}

.btn-login:hover {
    background-color: #1e62c4;
}

.error-message {
    margin-top: 15px;
    color: #d93025;
    background-color: #fce8e6;
    padding: 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    display: none;
}

/* --- MINECRAFT PIXEL CLOUDS --- */
.pixel-cloud {
    position: absolute;
    z-index: 1; 
    width: 10px;
    height: 10px;
    background: transparent;
    image-rendering: pixelated;
    opacity: 0.65;
}

.cloud-1 { top: 7%;   transform: scale(2.0); animation: floatAndBob 52s linear infinite; }
.cloud-2 { top: 18%; transform: scale(3.5); animation: floatAndBob 34s linear infinite; animation-delay: -10s; }
.cloud-3 { top: 32%; transform: scale(1.8); animation: floatAndBob 46s linear infinite; animation-delay: -22s; }
.cloud-4 { top: 45%; transform: scale(4.2); animation: floatAndBob 26s linear infinite; animation-delay: -5s; }
.cloud-5 { top: 58%; transform: scale(2.2); animation: floatAndBob 40s linear infinite; animation-delay: -15s; }
.cloud-6 { top: 70%; transform: scale(3.0); animation: floatAndBob 49s linear infinite; animation-delay: -30s; }
.cloud-7 { top: 82%; transform: scale(1.5); animation: floatAndBob 62s linear infinite; animation-delay: -12s; }
.cloud-8 { top: 90%; transform: scale(2.5); animation: floatAndBob 31s linear infinite; animation-delay: -18s; }
.cloud-9 { top: 25%; transform: scale(2.8); animation: floatAndBob 55s linear infinite; animation-delay: -40s; }
.cloud-10 { top: 64%; transform: scale(3.4); animation: floatAndBob 38s linear infinite; animation-delay: -8s; }

@keyframes floatAndBob {
    0% {
        left: -250px;
        box-shadow:
            30px 10px 0 #4d94ff, 40px 10px 0 #4d94ff,
            20px 20px 0 #4d94ff, 30px 20px 0 #4d94ff, 40px 20px 0 #4d94ff, 50px 20px 0 #4d94ff,
            10px 30px 0 #4d94ff, 20px 30px 0 #4d94ff, 30px 30px 0 #4d94ff, 40px 30px 0 #4d94ff, 50px 30px 0 #4d94ff, 60px 30px 0 #4d94ff,
            20px 40px 0 #4d94ff, 30px 40px 0 #4d94ff, 40px 40px 0 #4d94ff, 50px 40px 0 #4d94ff;
    }
    50% {
        box-shadow:
            30px -5px 0 #4d94ff, 40px -5px 0 #4d94ff,
            20px 5px 0 #4d94ff, 30px 5px 0 #4d94ff, 40px 5px 0 #4d94ff, 50px 5px 0 #4d94ff,
            10px 15px 0 #4d94ff, 20px 15px 0 #4d94ff, 30px 15px 0 #4d94ff, 40px 15px 0 #4d94ff, 50px 15px 0 #4d94ff, 60px 15px 0 #4d94ff,
            20px 25px 0 #4d94ff, 30px 25px 0 #4d94ff, 40px 25px 0 #4d94ff, 50px 25px 0 #4d94ff;
    }
    100% {
        left: 100vw;
        box-shadow:
            30px 10px 0 #4d94ff, 40px 10px 0 #4d94ff,
            20px 20px 0 #4d94ff, 30px 20px 0 #4d94ff, 40px 20px 0 #4d94ff, 50px 20px 0 #4d94ff,
            10px 30px 0 #4d94ff, 20px 30px 0 #4d94ff, 30px 30px 0 #4d94ff, 40px 30px 0 #4d94ff, 50px 30px 0 #4d94ff, 60px 30px 0 #4d94ff,
            20px 40px 0 #4d94ff, 30px 40px 0 #4d94ff, 40px 40px 0 #4d94ff, 50px 40px 0 #4d94ff;
    }
}

/* ==========================================================================
   4. Guide Layout & Sidebar Dashboard
   ========================================================================= */
.guide-layout {
    display: flex;
    margin-top: 60px;
    min-height: calc(100vh - 60px);
}

.sidebar {
    width: 260px;
    background-color: white;
    border-right: 1px solid #e0e0e0;
    padding: 24px 16px;

    /* NEU: Komplett feste Positionierung links, damit es auch bei Tabellen/Submissions nie mitscrollt */
    position: fixed;
    top: 60px; 
    left: 0;
    height: calc(100vh - 60px); 
    z-index: 90;
    overflow-y: auto; 
}

.content-area {
    flex: 1;
    background-color: #f8f9fa;
    padding: 40px;
    
    /* NEU: Da die Sidebar nun "fixed" ist, muss der Content-Bereich links Platz machen */
    margin-left: 260px; 
}

.sidebar-nav h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding-left: 8px;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 4px;
}

.sidebar-nav a {
    display: block;
    padding: 10px 12px;
    color: #444;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: background 0.2s, color 0.2s;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    background-color: #e8f0fe;
    color: #2b78e4;
    font-weight: 500;
}

/* ==========================================================================
   5. Guide Content Formatting
   ========================================================================= */
.guide-article {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    max-width: 800px;
    margin: 0 auto;
}

.guide-article h1 {
    font-size: 2rem;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.guide-meta {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
}

.guide-intro p {
    font-size: 1.05rem;
    color: #444;
    line-height: 1.6;
    margin-bottom: 15px;
}

.rules-box {
    background-color: #fff5f5;
    border-left: 4px solid #e53e3e;
    padding: 20px;
    border-radius: 6px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(229, 62, 62, 0.05);
}

.rules-box-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #c53030;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.rules-box ol {
    padding-left: 20px;
}

.rules-box li {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 10px;
    font-size: 0.98rem;
}

.rules-box li:last-child {
    margin-bottom: 0;
}

.guide-steps {
    list-style: none;
    margin-top: 25px;
}

.guide-steps li {
    margin-bottom: 35px;
}

.step-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2b78e4;
    margin-bottom: 10px;
}

.guide-steps p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.guide-steps a {
    color: #2b78e4;
    text-decoration: none;
    word-break: break-all;
}

.guide-steps a:hover {
    text-decoration: underline;
}

.code-box {
    background-color: #1a1d21;
    color: #e2e8f0;
    padding: 16px;
    border-radius: 6px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    white-space: pre-line;
    line-height: 1.6;
    margin: 15px 0;
    border-left: 4px solid #2b78e4;
}

.guide-image-container {
    margin-top: 15px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    border: 1px solid #e2e8f0;
    max-width: 100%;
}

.guide-screenshot {
    width: 100%;
    height: auto;
    display: block;
}

.tips-section {
    margin-top: 40px;
    padding-top: 25px;
    border-top: 2px dashed #e0e0e0;
}

.tips-section h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 15px;
}

.tips-section ul {
    list-style-type: square;
    padding-left: 20px;
    margin-bottom: 20px;
}

.tips-section li {
    color: #444;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* ==========================================================================
   6. Image Zoom / Lightbox Effect
   ========================================================================= */
.zoom-checkbox {
    display: none;
}

.zoom-label {
    cursor: zoom-in;
    display: block;
    width: 100%;
}

.zoom-checkbox:checked + .zoom-label {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    animation: fadeIn 0.15s ease-in-out;
    overflow-y: auto;
    overflow-x: hidden;
}

.zoom-checkbox:checked + .zoom-label .guide-screenshot {
    max-width: 98%;
    max-height: 95vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    cursor: zoom-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================================================
   7. Responsive Viewport Adaptations
   ========================================================================= */
@media (max-width: 768px) {
    .guide-layout {
        flex-direction: column;
        margin-top: 60px;
    }
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        position: relative; 
        top: 0;
        left: 0;
        height: auto;
    }
    .content-area {
        padding: 20px;
        margin-left: 0; /* Setzt den Abstand auf Mobilgeräten zurück */
    }
    .guide-article {
        padding: 20px;
    }
}