/*
 * T.Y.R.K SaaS Web App Main Stylesheet
 * Architecture: Mobile-First, Developer Portal Aesthetic
 * Font: Nunito Sans
 */

:root {
    --bg-main: #f4f5f7; /* Nox IRC Main Area */
    --bg-surface: #ffffff;
    --sidebar-bg: #202a37; /* Nox IRC Dark Navy Sidebar */
    --sidebar-text: #b3bdc9;
    --sidebar-active: rgba(255, 255, 255, 0.1);
    --accent-blue: #1e56d4; /* Nox IRC Active Tab Blue */
    --accent-green: #2a5944; /* Nox IRC 'Ana Menü' Dark Green */
    --text-main: #333;
    --text-muted: #777;
    --border-color: #dee2e6;
    --code-bg: #e6e9f0; /* Nox IRC Top Navbar Color */
    
    --sidebar-width: 260px;
    --right-sidebar-width: 220px;
    --navbar-height: 65px;
    --bottom-nav-height: 60px;
}

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

body {
    font-family: 'Nunito Sans', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow: hidden; 
}

#app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

/* UI Elements */
.plan-badge {
    background-color: rgba(9, 132, 227, 0.1);
    color: var(--accent-blue);
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
}

.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    margin-bottom: 20px;
}

.api-key-box {
    display: flex;
    align-items: center;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 15px;
    margin-top: 15px;
}

.api-key-box input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: monospace;
    font-size: 1.1rem;
    color: var(--text-main);
    outline: none;
}

.copy-btn {
    background: var(--accent-blue);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.code-block {
    background: var(--code-bg);
    color: #e83e8c;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    overflow-x: auto;
    margin-top: 15px;
    border: 1px solid var(--border-color);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding-bottom: var(--bottom-nav-height); 
}

.top-navbar {
    height: var(--navbar-height);
    background-color: var(--code-bg); /* Nox IRC Light Gray */
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 20px;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
}

.hamburger-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-main);
    cursor: pointer;
}

.page-title {
    font-weight: 800;
    font-size: 1.2rem;
}

.status-btn {
    background-color: rgba(0, 184, 148, 0.1);
    color: var(--accent-green);
    border: 1px solid rgba(0, 184, 148, 0.2);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-green);
    border-radius: 50%;
    display: inline-block;
}

.view-container {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.sidebar, .right-sidebar {
    position: fixed;
    top: 0; bottom: 0;
    background-color: var(--sidebar-bg);
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar {
    left: 0;
    width: var(--sidebar-width);
    transform: translateX(-100%);
}

.right-sidebar {
    right: 0;
    width: var(--right-sidebar-width);
    transform: translateX(100%);
    background-color: #eff1f5; /* Nox IRC Odalar bg */
    border-left: 1px solid var(--border-color);
}

.sidebar-header {
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 800;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background-color: var(--accent-green); /* Like Ana Menü */
}
.logo-icon { color: var(--accent-blue); margin-right: 10px; }
.close-sidebar-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--sidebar-text);
    font-size: 1.2rem;
    cursor: pointer;
}
.sidebar-menu { list-style: none; padding: 15px 0; }
.sidebar-menu li {
    padding: 12px 20px;
    color: var(--sidebar-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.2s;
    font-weight: 600;
}
.sidebar-menu li:hover {
    background-color: var(--sidebar-active);
    color: var(--accent-blue);
}
.sidebar-menu li.active {
    background-color: var(--sidebar-active);
    color: var(--accent-blue);
    border-left: 4px solid var(--accent-blue);
}

.right-sidebar-header {
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    font-weight: 800;
    border-bottom: 1px solid var(--border-color);
}
.node-list { padding: 20px; }
.node-item {
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}
.node-item small { color: var(--text-muted); margin-left: auto; font-weight: 400; }
.node-dot.green { background-color: var(--accent-green); }
.node-dot.blue { background-color: var(--accent-blue); }

.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--bottom-nav-height);
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 90;
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    gap: 4px;
}
.nav-item i { font-size: 1.2rem; }
.nav-item.active { color: var(--accent-blue); }

.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.modal-overlay.show { opacity: 1; pointer-events: all; }
.app-modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -45%);
    background: var(--bg-surface);
    width: 90%;
    max-width: 450px;
    border-radius: 12px;
    z-index: 210;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.app-modal.show {
    transform: translate(-50%, -50%);
    opacity: 1;
    pointer-events: all;
}
.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h3 { font-size: 1.1rem; font-weight: 800; }
.close-modal {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
}
.modal-body { padding: 20px; }

.desktop-only { display: none !important; }
.mobile-only { display: block !important; }
button.mobile-only, span.mobile-only { display: inline-block !important; }
.sidebar.open { transform: translateX(0); }
.right-sidebar.open { transform: translateX(0); display: block !important; }

@media (min-width: 900px) {
    #app-container { flex-direction: row; }
    .mobile-only { display: none; }
    .desktop-only { display: block; }
    
    .sidebar, .right-sidebar { position: static; transform: translateX(0); }
    .main-content { padding-bottom: 0; }
}
