/* =========================================
   Kunden-Chat (index.html) - STRUKON APP DESIGN
   ========================================= */

:root {
    --strukon-green: #84cc5c;
    --dark-bg: #121212;
    --sidebar-bg: #0a0a0a;
    --panel-bg: #1e1e1e;
    --border-color: #333;
    --text-grey: #888;
}

body {
    background-color: var(--dark-bg);
    color: white;
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
}

.strukon-wrapper {
    display: flex;
    height: 100vh;
    background-color: #000;
    color: #fff;
    font-family: 'Segoe UI', sans-serif;
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background: #0a0a0a;
    border-right: 1px solid #1f1f1f;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    margin-bottom: 30px;
    border-bottom: 1px solid #1f1f1f;
    padding-bottom: 15px;
}

.sidebar-header h2 {
    margin: 0;
    color: #fff;
    font-size: 1.2rem;
}

.status-online {
    color: #84cc5c;
    font-size: 0.9rem;
    margin: 5px 0 0 0;
}

.nav-item {
    padding: 10px;
    margin: 5px 0;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    color: #ccc;
}

.nav-item.active {
    border-color: #3e5d2b;
    background: #151a11;
    color: #fff;
}

.history-section {
    margin-top: auto;
}

.history-section h3 {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 10px;
}

.history-section ul {
    list-style: none;
    padding: 0;
}

.history-section li {
    padding: 5px 0;
    color: #aaa;
    cursor: pointer;
    font-size: 0.9rem;
}

.history-section li:hover {
    color: #fff;
}

/* Chat Bereich Styling */
.chat-main { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    background: #111;
}

.top-bar {
    padding: 15px 20px;
    border-bottom: 1px solid #222;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #111;
}

.upgrade-btn {
    background: #0070ba; 
    color: white; 
    border: none; 
    padding: 5px 15px; 
    border-radius: 15px; 
    font-weight: bold; 
    cursor: pointer; 
    font-size: 0.8rem;
}

#chat-display { 
    flex: 1; 
    padding: 30px; 
    overflow-y: auto; 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
}

.msg { 
    max-width: 70%; 
    padding: 15px 20px; 
    border-radius: 15px; 
    line-height: 1.5; 
    font-size: 0.95rem;
}

.bot { 
    background: #2a2a2a; 
    align-self: flex-start; 
    color: #ddd;
    border-bottom-left-radius: 2px;
}

.user {
    background: #84cc5c;
    color: black;
    align-self: flex-end;
    font-weight: 500;
    border-bottom-right-radius: 2px;
}

/* Chat Input Styling (unten weiß umrandet wie im Bild) */
.chat-input-area {
    padding: 20px;
    background: #111;
    border-top: 1px solid #222;
}

.input-hint {
    color: #666;
    font-size: 0.8rem;
    margin-bottom: 8px;
    font-family: monospace;
}

.input-container {
    display: flex;
    background: #fff; /* Der weiße Rahmen aus deinem Wunsch-Design */
    border-radius: 8px;
    padding: 5px;
}

#ai-query {
    flex: 1;
    border: none;
    padding: 12px;
    font-size: 16px;
    outline: none;
    color: #333;
}

#send-btn {
    background: #84cc5c; /* Das helle Strukon-Grün */
    border: none;
    color: #000;
    font-weight: bold;
    padding: 0 25px;
    border-radius: 6px;
    cursor: pointer;
}

/* =========================================
   RESPONSIVE DESIGN (Mobile & Tablet)
   ========================================= */

/* Menu Button immer anzeigen (auch Desktop) */
#mobile-menu-btn {
    display: block;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 15px;
    padding: 5px;
    line-height: 1;
}

#mobile-menu-btn:hover {
    color: #84cc5c;
}

/* Sidebar Animation für Desktop */
.sidebar {
    transition: margin-left 0.3s ease, transform 0.3s ease;
}

.sidebar.collapsed {
    margin-left: -300px; /* Sidebar ausblenden am Desktop */
}

/* Overlay für Mobile Sidebar */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(2px);
}

.overlay.active {
    display: block;
}

@media (max-width: 768px) {
    /* Layout Anpassung */
    .strukon-wrapper {
        position: relative;
        overflow: hidden;
    }

    /* Sidebar als Drawer */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        width: 280px;
        z-index: 1000;
        transform: translateX(-100%);
        margin-left: 0; /* Reset Desktop margin logic */
        box-shadow: 2px 0 10px rgba(0,0,0,0.5);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    /* Menu Button anzeigen */
    #mobile-menu-btn {
        display: block;
    }

    /* Chat Bereich */
    .chat-main {
        width: 100%;
        height: 100vh;
    }

    .msg {
        max-width: 85%;
        font-size: 0.9rem;
    }

    /* Input Bereich kompakter */
    .chat-input-area {
        padding: 10px;
    }

    #ai-query {
        font-size: 14px;
    }

    #send-btn {
        padding: 0 15px;
        font-size: 0.9rem;
    }
}

/* Login Overlay Styles (Matrix Look preserved) */
#loginOverlay {
    font-family: 'Courier New', Courier, monospace;
}

/* =========================================
   PRICING MODAL STYLES
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: #1e1e1e;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 900px;
    position: relative;
    border: 1px solid #333;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #888;
    z-index: 10;
}

.close-modal:hover {
    color: #fff;
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #fff;
    margin-top: 10px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding-bottom: 10px;
}

.plan-card {
    background: #111;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #333;
    text-align: center;
    transition: transform 0.3s ease;
}

.plan-card:hover {
    transform: translateY(-5px);
    border-color: #84cc5c;
}

.plan-card.featured {
    background: #1a2e15; /* Dark green tint */
    border: 1px solid #84cc5c;
    transform: scale(1.05);
    z-index: 1;
}

@media (max-width: 768px) {
    .modal-content {
        padding: 15px;
        width: 95%;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .plan-card.featured {
        transform: none;
        border-width: 2px;
        box-shadow: 0 0 15px rgba(132, 204, 92, 0.2);
    }
    
    .plan-card:hover {
        transform: none;
    }
}

.plan-card h3 {
    color: #fff;
    margin-top: 0;
}

.plan-card .price {
    font-size: 1.5rem;
    color: #84cc5c;
    margin: 15px 0;
    font-weight: bold;
}

.plan-card ul {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
    text-align: left;
}

.plan-card li {
    padding: 8px 0;
    border-bottom: 1px solid #222;
    color: #ccc;
    font-size: 0.9rem;
}

.plan-btn {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #444;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.plan-btn.primary {
    background: #84cc5c;
    color: #000;
    border: none;
    font-weight: bold;
}

.plan-btn:hover {
    background: #333;
}

.plan-btn.primary:hover {
    background: #6ab045;
}

/* Debug Console Style - VERSTECKT */
#debugConsole {
    position: fixed; bottom: 10px; right: 10px; width: 400px; height: 200px; 
    background: rgba(0,0,0,0.9); border: 2px solid red; color: #fff; 
    font-size: 12px; overflow-y: scroll; z-index: 99999; display: none;
    padding: 10px; font-family: monospace;
}
