/* CSS Design System for Autobot SEO Planner - SaaS 9 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;700&family=Outfit:wght@300;400;600;800&display=swap');

:root {
    --bg-dark: #06090e;
    --bg-card: rgba(13, 22, 34, 0.7);
    --border-color: rgba(6, 182, 212, 0.2);
    --border-glow: rgba(6, 182, 212, 0.08);
    --primary-cyan: #06b6d4;
    --primary-cobalt: #2563eb;
    --primary-blue: #3b82f6;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --neon-shadow: 0 0 25px rgba(6, 182, 212, 0.35);
    --neon-shadow-blue: 0 0 25px rgba(37, 99, 235, 0.35);
    --glass-blur: blur(18px);
}

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

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 10% 15%, rgba(6, 182, 212, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 85%, rgba(37, 99, 235, 0.08) 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--text-light);
    font-family: 'Outfit', 'Noto Sans Thai', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Container & Header */
.app-container {
    max-width: 1550px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-section h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 40px rgba(6, 182, 212, 0.2);
}

.logo-section p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-top: 0.25rem;
}

.status-badge {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid var(--primary-cyan);
    border-radius: 99px;
    padding: 0.5rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    color: var(--primary-cyan);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.15);
}

.status-dot {
    width: 10px;
    height: 10px;
    background-color: var(--primary-cyan);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-cyan);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(6, 182, 212, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(6, 182, 212, 0); }
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Cards */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), var(--border-glow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 2rem;
}

.glass-card:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 30px rgba(6, 182, 212, 0.15);
}

.card-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border-left: 4px solid var(--primary-cyan);
    padding-left: 0.8rem;
}

/* Keyword Strength Meter & Bar */
.strength-container {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 1.5rem;
}

.strength-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.strength-bar-bg {
    width: 100%;
    height: 10px;
    background: rgba(255,255,255,0.08);
    border-radius: 5px;
    overflow: hidden;
}

.strength-bar-fill {
    width: 35%; /* Updated by JS */
    height: 100%;
    background: linear-gradient(to right, var(--primary-blue), var(--primary-cyan));
    border-radius: 5px;
    box-shadow: 0 0 10px var(--primary-cyan);
    transition: width 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Big Metrics Dashboard Row */
.metric-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.metric-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.2rem;
    text-align: center;
}

.metric-card span {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
}

.metric-card h3 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-cyan);
    margin-top: 0.4rem;
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

/* Forms & fields */
.config-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.field-box {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.field-box label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-light);
}

select, input[type="text"], textarea {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    outline: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

select:focus, input[type="text"]:focus, textarea:focus {
    border-color: var(--primary-cyan);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.25);
}

/* Premium Buttons */
.btn {
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-blue));
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 1rem 1.8rem;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    width: 100%;
    box-shadow: var(--neon-shadow);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.5);
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-cyan));
}

.btn:active {
    transform: translateY(0);
}

/* Editor/Article output container */
.article-preview-box {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 1.5rem;
    max-height: 480px;
    overflow-y: auto;
    font-size: 1rem;
    color: #e2e8f0;
}

.article-preview-box h2 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary-cyan);
    padding-bottom: 0.5rem;
}

.article-preview-box p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.article-preview-box h3 {
    font-size: 1.25rem;
    color: var(--primary-cyan);
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
}

/* Table layout for scheduling */
.schedule-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.schedule-table th, .schedule-table td {
    padding: 0.9rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.schedule-table th {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.schedule-table td .status-indicator {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-posted {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.status-scheduled {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

/* Console logs look */
.console-logs {
    background: rgba(3, 5, 8, 0.95);
    border: 1px solid rgba(6, 182, 212, 0.15);
    border-radius: 12px;
    padding: 1.2rem;
    font-family: monospace;
    font-size: 0.9rem;
    color: #93c5fd;
    height: 150px;
    overflow-y: auto;
    margin-top: 1.5rem;
}

.console-line {
    margin-bottom: 0.4rem;
    display: flex;
    gap: 0.8rem;
}

.console-timestamp {
    color: var(--primary-cyan);
}

.console-success {
    color: #10b981;
}

.console-info {
    color: #3b82f6;
}

.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(16, 185, 129, 0.9);
    backdrop-filter: blur(8px);
    color: white;
    padding: 1rem 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    z-index: 999;
    font-weight: 600;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}
