/*
Theme Name: LuckyTheme
Theme URI: https://github.com/LuckyMCP/LuckyTheme
Author: LuckyMCP Team
Author URI: https://luckymcp.com
Description: Verspieltes Gaming-Theme mit flexiblem Layout, Multi-Design Support und Event-Scheduler. Perfekt fuer Gaming-Communities und Private Server.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: luckytheme
Tags: gaming, dark, custom-colors, custom-menu, featured-images, flexible-header, full-width-template, theme-options
*/

/* ==========================================================================
   CSS VARIABLES - Farbschema System
   ========================================================================== */

:root {
    /* Primaerfarben */
    --lt-primary: #667eea;
    --lt-primary-hover: #5a6fd6;
    --lt-secondary: #764ba2;
    --lt-accent: #f093fb;

    /* Hintergruende */
    --lt-bg-dark: #0f0f1a;
    --lt-bg-medium: #1a1a2e;
    --lt-bg-light: #16213e;
    --lt-bg-card: rgba(255, 255, 255, 0.03);

    /* Text */
    --lt-text-primary: #e1e1e6;
    --lt-text-secondary: #a3a3c2;
    --lt-text-muted: #6c6c8a;

    /* Borders */
    --lt-border: rgba(255, 255, 255, 0.1);
    --lt-border-hover: rgba(255, 255, 255, 0.2);

    /* Status */
    --lt-success: #10b981;
    --lt-warning: #f59e0b;
    --lt-error: #ef4444;
    --lt-info: #3b82f6;

    /* Effekte */
    --lt-glow: 0 0 20px rgba(102, 126, 234, 0.4);
    --lt-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

    /* Layout */
    --lt-sidebar-width: 300px;
    --lt-container-max: 1400px;
    --lt-header-height: 80px;

    /* Animation */
    --lt-transition: 0.3s ease;
    --lt-transition-fast: 0.15s ease;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--lt-text-primary);
    background: var(--lt-bg-dark);
    min-height: 100vh;
}

a {
    color: var(--lt-primary);
    text-decoration: none;
    transition: color var(--lt-transition);
}

a:hover {
    color: var(--lt-accent);
}

img {
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   LAYOUT - Flexibles 3-Spalten System
   ========================================================================== */

.lt-site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.lt-site-content {
    flex: 1;
    display: flex;
    max-width: var(--lt-container-max);
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    gap: 30px;
}

/* Hauptinhalt - nimmt verfuegbaren Platz */
.lt-main-content {
    flex: 1;
    min-width: 0;
}

/* Sidebars - optional */
.lt-sidebar {
    width: var(--lt-sidebar-width);
    flex-shrink: 0;
}

.lt-sidebar-left {
    order: -1;
}

.lt-sidebar-right {
    order: 1;
}

/* Wenn keine Sidebars: volle Breite */
.lt-site-content.no-sidebars .lt-main-content {
    max-width: 100%;
}

/* Wenn nur eine Sidebar */
.lt-site-content.has-left-sidebar .lt-main-content,
.lt-site-content.has-right-sidebar .lt-main-content {
    max-width: calc(100% - var(--lt-sidebar-width) - 30px);
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.lt-header {
    background: linear-gradient(180deg, var(--lt-bg-medium) 0%, var(--lt-bg-dark) 100%);
    border-bottom: 1px solid var(--lt-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.lt-header-inner {
    max-width: var(--lt-container-max);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--lt-header-height);
}

/* Logo */
.lt-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lt-logo img {
    height: 50px;
    width: auto;
}

.lt-logo-text {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--lt-primary) 0%, var(--lt-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */

.lt-nav {
    display: flex;
    align-items: center;
}

.lt-nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.lt-nav-menu li {
    position: relative;
}

.lt-nav-menu > li > a {
    display: block;
    padding: 12px 20px;
    color: var(--lt-text-primary);
    font-weight: 500;
    border-radius: 8px;
    transition: all var(--lt-transition);
    position: relative;
    overflow: hidden;
}

.lt-nav-menu > li > a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--lt-primary), var(--lt-accent));
    transition: all var(--lt-transition);
    transform: translateX(-50%);
}

.lt-nav-menu > li > a:hover {
    color: var(--lt-accent);
    background: var(--lt-bg-card);
}

.lt-nav-menu > li > a:hover::before {
    width: 80%;
}

/* Dropdown */
.lt-nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--lt-bg-medium);
    border: 1px solid var(--lt-border);
    border-radius: 12px;
    padding: 10px;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--lt-transition);
    box-shadow: var(--lt-shadow);
}

.lt-nav-menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lt-nav-menu .sub-menu a {
    display: block;
    padding: 10px 15px;
    color: var(--lt-text-secondary);
    border-radius: 8px;
    transition: all var(--lt-transition);
}

.lt-nav-menu .sub-menu a:hover {
    color: var(--lt-text-primary);
    background: var(--lt-bg-card);
    padding-left: 20px;
}

/* Sub-Sub-Menu (3. Ebene) - oeffnet nach rechts */
.lt-nav-menu .sub-menu .sub-menu {
    top: 0;
    left: 100%;
    margin-left: 5px;
    margin-top: -10px;
}

/* Falls kein Platz rechts, nach links oeffnen */
.lt-nav-menu .sub-menu .sub-menu.open-left {
    left: auto;
    right: 100%;
    margin-left: 0;
    margin-right: 5px;
}

/* Pfeil-Indikator fuer Untermenues */
.lt-nav-menu .sub-menu .menu-item-has-children > a::after {
    content: '\25B6';
    font-size: 10px;
    float: right;
    margin-left: 10px;
    opacity: 0.6;
}

/* Mobile Menu Toggle */
.lt-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--lt-text-primary);
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.lt-footer {
    background: var(--lt-bg-medium);
    border-top: 1px solid var(--lt-border);
    padding: 40px 20px;
    margin-top: auto;
}

.lt-footer-inner {
    max-width: var(--lt-container-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.lt-footer-section h4 {
    color: var(--lt-text-primary);
    margin: 0 0 20px 0;
    font-size: 18px;
}

.lt-footer-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.lt-footer-section li {
    margin-bottom: 10px;
}

.lt-footer-section a {
    color: var(--lt-text-secondary);
}

.lt-footer-section a:hover {
    color: var(--lt-accent);
}

.lt-footer-bottom {
    max-width: var(--lt-container-max);
    margin: 40px auto 0;
    padding-top: 20px;
    border-top: 1px solid var(--lt-border);
    text-align: center;
    color: var(--lt-text-muted);
    font-size: 14px;
}

/* ==========================================================================
   WIDGETS / SIDEBAR
   ========================================================================== */

.lt-widget {
    background: var(--lt-bg-card);
    border: 1px solid var(--lt-border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.lt-widget-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--lt-border);
    color: var(--lt-text-primary);
}

.lt-widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.lt-widget li {
    padding: 8px 0;
    border-bottom: 1px solid var(--lt-border);
}

.lt-widget li:last-child {
    border-bottom: none;
}

/* ==========================================================================
   CARDS & CONTENT
   ========================================================================== */

.lt-card {
    background: var(--lt-bg-card);
    border: 1px solid var(--lt-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all var(--lt-transition);
}

.lt-card:hover {
    border-color: var(--lt-border-hover);
    box-shadow: var(--lt-glow);
    transform: translateY(-2px);
}

.lt-card-image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.lt-card-content {
    padding: 20px;
}

.lt-card-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.lt-card-excerpt {
    color: var(--lt-text-secondary);
    margin: 0;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.lt-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--lt-transition);
    border: none;
    text-decoration: none;
}

.lt-btn-primary {
    background: linear-gradient(135deg, var(--lt-primary) 0%, var(--lt-secondary) 100%);
    color: #fff;
}

.lt-btn-primary:hover {
    box-shadow: var(--lt-glow);
    transform: translateY(-2px);
    color: #fff;
}

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

.lt-btn-secondary:hover {
    border-color: var(--lt-primary);
    color: var(--lt-primary);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
    .lt-sidebar {
        width: 250px;
    }

    :root {
        --lt-sidebar-width: 250px;
    }
}

@media (max-width: 768px) {
    .lt-site-content {
        flex-direction: column;
    }

    .lt-sidebar {
        width: 100%;
        order: 2;
    }

    .lt-sidebar-left {
        order: 2;
    }

    .lt-menu-toggle {
        display: block;
    }

    .lt-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--lt-bg-medium);
        border-bottom: 1px solid var(--lt-border);
        padding: 20px;
    }

    .lt-nav.is-open {
        display: block;
    }

    .lt-nav-menu {
        flex-direction: column;
    }

    .lt-nav-menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding-left: 20px;
        background: transparent;
    }

    .lt-header-inner {
        height: auto;
        padding: 15px 20px;
        flex-wrap: wrap;
    }
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

.lt-container {
    max-width: var(--lt-container-max);
    margin: 0 auto;
    padding: 0 20px;
}

.lt-text-center { text-align: center; }
.lt-text-left { text-align: left; }
.lt-text-right { text-align: right; }

.lt-mt-1 { margin-top: 10px; }
.lt-mt-2 { margin-top: 20px; }
.lt-mt-3 { margin-top: 30px; }
.lt-mb-1 { margin-bottom: 10px; }
.lt-mb-2 { margin-bottom: 20px; }
.lt-mb-3 { margin-bottom: 30px; }

.lt-hidden { display: none; }
.lt-visible { display: block; }

/* Glow Animation */
@keyframes lt-glow-pulse {
    0%, 100% { box-shadow: 0 0 5px var(--lt-primary); }
    50% { box-shadow: 0 0 20px var(--lt-primary), 0 0 30px var(--lt-accent); }
}

.lt-glow-animate {
    animation: lt-glow-pulse 2s infinite;
}

/* RGB Border Animation */
@keyframes lt-rgb-border {
    0% { border-color: #667eea; }
    33% { border-color: #764ba2; }
    66% { border-color: #f093fb; }
    100% { border-color: #667eea; }
}

.lt-rgb-border {
    animation: lt-rgb-border 3s infinite;
}
