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

body {
    font-family: 'Segoe UI', sans-serif;
    color: white;
    background: #0b0f2a;
    overflow-x: hidden;
}

/* ================= BACKGROUND CONTROL ================= */

/* Homepage background */
body.home-page {
    background: #0b0f2a;
}

body.home-page::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url("/static/images/background.jpg") center/cover no-repeat;
    z-index: -2;
}

body.home-page::after {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(0,0,0,0.85));
    z-index: -1;
}

/* Inner pages */
body.inner-page {
    background: #0f172a;
}

/* ================= NAVBAR ================= */

.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
    padding: 15px 30px;
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

/* Glass only homepage */
body.home-page .navbar {
    backdrop-filter: blur(15px);
    background: rgba(255,255,255,0.08);
}

/* Solid on inner pages */
body.inner-page .navbar {
    background: #111827;
    border: 1px solid #1f2937;
}

.logo {
    font-size: 20px;
    font-weight: bold;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: 0.3s;
}

.nav-links a:hover {
    color: #6ee7ff;
}

/* ================= PAGE CONTENT ================= */

.page-content {
    padding-top: 160px;
    width: 85%;
    margin: auto;
}

/* ================= HERO ================= */

.hero {
    height: 85vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-content h1 {
    font-size: 60px;
    margin-bottom: 20px;
    background: linear-gradient(90deg, #6ee7ff, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 20px;
    opacity: 0.9;
    margin-bottom: 30px;
}

.primary-btn {
    padding: 14px 30px;
    border-radius: 12px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.primary-btn:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.05);
}

/* ================= SERVICES ================= */

.services-section {
    padding: 80px 0;
    text-align: center;
}

.services-section h2 {
    margin-bottom: 50px;
    font-size: 32px;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

/* Service cards */
.service-card {
    padding: 30px;
    border-radius: 16px;
    background: #111827;
    border: 1px solid #1f2937;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    display: block;
}

.service-card h3 {
    font-size: 22px;
    margin-bottom: 10px;
}

.service-card p {
    font-size: 15px;
    color: #d1d5db;
}

.service-card:hover {
    background: #1e293b;
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

/* ================= AWS PAGE ================= */

.clean-card {
    margin-bottom: 40px;
    padding: 35px;
    border-radius: 16px;
    background: #111827;
    border: 1px solid #1f2937;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.clean-card h2 {
    margin-bottom: 20px;
}

/* Table */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 12px;
    text-align: left;
}

th {
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

tr {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.status.running {
    color: #22c55e;
    font-weight: bold;
}

.status.stopped {
    color: #f87171;
    font-weight: bold;
}

/* ================= TRAINING BUTTON FIX ================= */

.training-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 28px;
    border-radius: 10px;
    background: #2563eb;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.training-btn:hover {
    background: #1d4ed8;
    transform: translateY(-3px);
}


/* ================= CHAT LAYOUT ================= */

.chat-layout {
    display: flex;
    width: 90%;
    margin: 60px auto;
    height: 80vh;
    gap: 20px;
}

/* Sidebar */
.chat-sidebar {
    width: 260px;
    background: #111827;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #1f2937;
    display: flex;
    flex-direction: column;
}

.history-list {
    flex: 1;
    overflow-y: auto;
    margin-top: 15px;
}

.history-item {
    padding: 10px;
    background: #1e293b;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 13px;
    cursor: pointer;
}

.danger-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
}

/* Chat main */
.chat-main {
    flex: 1;
    background: #111827;
    border-radius: 18px;
    border: 1px solid #1f2937;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 20px;
    border-bottom: 1px solid #1f2937;
    font-weight: 600;
}

/* Messages */
.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 70%;
    padding: 14px 18px;
    border-radius: 14px;
    font-size: 15px;
    line-height: 1.5;
    position: relative;
}

.user-message {
    align-self: flex-end;
    background: #2563eb;
}

.bot-message {
    align-self: flex-start;
    background: #1e293b;
}

/* Copy button */
.copy-btn {
    position: absolute;
    right: 8px;
    bottom: 8px;
    font-size: 11px;
    background: transparent;
    color: #aaa;
    border: none;
    cursor: pointer;
}

/* Input */
.chat-input-area {
    display: flex;
    border-top: 1px solid #1f2937;
}

.chat-input-area input[type="text"] {
    flex: 1;
    padding: 15px;
    border: none;
    background: #0f172a;
    color: white;
    outline: none;
}

.chat-input-area input[type="file"] {
    padding: 10px;
    background: #1e293b;
    border: none;
    color: white;
}

.chat-input-area button {
    padding: 0 25px;
    background: #2563eb;
    border: none;
    color: white;
    cursor: pointer;
}


/* ================= STORE ACTION BUTTONS ================= */

.store-actions {
    margin-top: 25px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.primary-search-btn {
    background: linear-gradient(90deg, #3b82f6, #6366f1);
    border: none;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(59,130,246,0.3);
}

.primary-search-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(99,102,241,0.5);
}

.secondary-btn {
    background: #1e293b;
    border: 1px solid #334155;
    padding: 14px 25px;
    border-radius: 10px;
    color: #cbd5e1;
    cursor: pointer;
    transition: 0.3s;
}

.secondary-btn:hover {
    background: #334155;
}

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

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-content {
    flex: 1;
    padding-top: 160px;
    width: 85%;
    margin: auto;
}

/* Footer always bottom */
.footer {
    padding: 25px 0;
    text-align: center;
    background: #111827;
    border-top: 1px solid #1f2937;
}
