* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Inter', sans-serif;
    background: #0f0f13;
    color: #e2e2ec;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}
.background-mesh {
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(123,44,191,0.15), transparent 60%);
    z-index: -1;
    pointer-events: none;
}
.container {
    width: 100%; max-width: 1200px; padding: 50px 20px;
    z-index: 1; display: flex; flex-direction: column; gap: 30px;
}
header { text-align: center; margin-bottom: 20px;}
.logo-icon { width: 56px; height: 56px; color: #9d4edd; margin-bottom: 15px; }
header h1 { font-size: 3rem; font-weight: 800; background: linear-gradient(to right, #e0aaff, #9d4edd); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
header p { color: #a9a9bc; margin-top: 10px; font-size: 1.1rem; max-width: 600px; margin: 15px auto 0 auto; line-height: 1.6;}

.input-group {
    display: flex; align-items: center; background: rgba(38,38,58,0.6); padding: 5px; border-radius: 16px; border: 1px solid #33334d; backdrop-filter: blur(10px);
}
.input-group i { margin: 0 15px; color: #a9a9bc; }
.input-group input {
    flex: 1; background: transparent; border: none; color: white; font-size: 1.05rem; outline: none; padding: 15px 0;
}
.input-group input::placeholder { color: #6a6a8c; }
.input-group button {
    background: #7b2cbf; color: white; border: none; border-radius: 12px; padding: 15px 35px; font-size: 1.05rem; font-weight: 600; cursor: pointer; transition: all 0.3s; display: flex; align-items: center; gap: 10px;
}
.input-group button:hover { background: #9d4edd; transform: translateY(-2px); box-shadow: 0 4px 20px rgba(157,78,221,0.5); }
.input-group button:disabled { background: #4d4d6b; pointer-events: none; transform: none; box-shadow: none;}

.hidden { display: none !important; }

#loading { text-align: center; padding: 70px 0; }
.spinner { width: 60px; height: 60px; border: 4px solid rgba(123,44,191,0.2); border-top-color: #9d4edd; border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 25px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Metrics */
.metrics { display: flex; gap: 20px; margin-bottom: 20px;}
.metric-card { flex: 1; background: rgba(38,38,58,0.5); border: 1px solid #33334d; border-radius: 16px; padding: 30px; text-align: center; backdrop-filter: blur(8px); transition: transform 0.2s;}
.metric-card:hover { transform: translateY(-5px); border-color: #7b2cbf; }
.metric-card h3 { color: #a9a9bc; font-size: 1.05rem; font-weight: 600; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1px;}
.metric-card p { color: #e0aaff; font-size: 3rem; font-weight: 800; text-shadow: 0 0 20px rgba(224,170,255,0.3);}

/* Tabs */
.tabs { display: flex; gap: 10px; border-bottom: 1px solid #33334d; margin-top: 10px; }
.tab-btn { background: transparent; color: #a9a9bc; border: none; padding: 15px 25px; font-size: 1.05rem; cursor: pointer; border-bottom: 3px solid transparent; font-weight: 600; transition: all 0.2s; }
.tab-btn:hover { color: white; background: rgba(255,255,255,0.03); border-radius: 8px 8px 0 0;}
.tab-btn.active { color: white; border-bottom-color: #7b2cbf; }
.tab-content { display: none; padding-top: 30px; animation: fadeIn 0.4s ease; }
.tab-content.active { display: block; }
@keyframes fadeIn { from{opacity:0; transform:translateY(15px);} to{opacity:1; transform:translateY(0);} }

/* Gallery */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.card { background: rgba(38,38,58,0.4); border: 1px solid #33334d; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; transition: transform 0.2s, border-color 0.2s; }
.card:hover { transform: translateY(-8px); border-color: #9d4edd; box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.card img { width: 100%; height: 250px; object-fit: cover; border-bottom: 1px solid #33334d; background: #1a1a24;}
.card-body { padding: 25px; display: flex; flex-direction: column; gap: 12px;}
.card-date { font-size: 0.9rem; color: #e0aaff; font-weight: 600; display: flex; align-items: center; gap: 8px;}
.card-text { font-size: 0.95rem; color: #cfcfd6; line-height: 1.6; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }

/* Table */
.table-container { background: rgba(38,38,58,0.4); border: 1px solid #33334d; border-radius: 16px; overflow-x: auto; padding: 25px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 18px; text-align: left; border-bottom: 1px solid #33334d; }
th { color: #a9a9bc; font-weight: 600; text-transform: uppercase; font-size: 0.9rem;}
td { color: #cfcfd6; font-size: 0.95rem; line-height: 1.5; }
tr:hover { background: rgba(255,255,255,0.02);}

/* AI */
.ai-cols { display: flex; gap: 25px; }
.ai-col { flex: 1; display:flex; flex-direction:column; gap:15px; }
.ai-col h2 { font-size: 1.4rem; margin-bottom: 15px; border-bottom: 1px solid #33334d; padding-bottom:15px; display: flex; align-items: center; gap: 10px;}
.ai-box { background: rgba(38,38,58,0.5); border-left: 4px solid #9d4edd; padding: 20px; border-radius: 8px; font-size: 1rem; line-height: 1.6; color: #cfcfd6;}
.ai-box.success { border-left-color: #00f5d4; }
.ai-box.warning { border-left-color: #f15bb5; }

/* Responsive */
@media (max-width: 900px) {
    .grid { grid-template-columns: repeat(2, 1fr); }
    .ai-cols { flex-direction: column; }
    header h1 { font-size: 2.2rem; }
}
@media (max-width: 600px) {
    .grid { grid-template-columns: 1fr; }
    .input-group { flex-direction: column; background: transparent; border: none; gap:15px;}
    .input-group input { width: 100%; background: rgba(38,38,58,0.6); border: 1px solid #33334d; border-radius: 12px; padding: 15px;}
    .input-group button { width: 100%; justify-content: center; }
    .input-group i { display: none; }
    .tabs { flex-wrap: wrap; }
    .tab-btn { flex: 1; text-align: center; }
}
