/* -------------------------------------------------------------
   IVAYLO GOCHEV SEO TOOLS - SOPHISTICATED HUMAN EDITORIAL DESIGN
   ------------------------------------------------------------- */

/* Custom Reset & Variables */
:root {
    --bg-main: #0b0c0f;
    --bg-card: rgba(20, 22, 28, 0.75);
    --bg-card-hover: rgba(26, 29, 36, 0.95);
    --bg-sidebar: rgba(14, 16, 21, 0.98);
    
    --border-color: rgba(255, 255, 255, 0.04);
    --border-glow: rgba(223, 193, 147, 0.04);
    --border-glow-active: rgba(223, 193, 147, 0.25);

    --text-primary: #f5f4f0;
    --text-secondary: #a3a8b3;
    --text-muted: #6a6f7d;
    --text-dim: #494c54;

    --accent-indigo: #dfc193; /* Luxury Gold */
    --accent-violet: #c5a880; /* Soft Brass */
    --accent-pink: #ebd8bd;   /* Light Cream Champagne */
    
    --gradient-accent: linear-gradient(135deg, #dfc193 0%, #c5a880 100%);
    --gradient-glow: radial-gradient(circle, rgba(223, 193, 147, 0.05) 0%, transparent 100%);

    --success: #8ba888; /* Sage Green */
    --success-bg: rgba(139, 168, 136, 0.08);
    --warning: #d99f6c; /* Soft Terracotta */
    --warning-bg: rgba(217, 159, 108, 0.08);
    --danger: #c97b70; /* Muted Coral */
    --danger-bg: rgba(201, 123, 112, 0.08);
    
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    --transition-smooth: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-premium: 0 30px 60px -25px rgba(0, 0, 0, 0.75);
    --glass-blur: blur(25px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(223, 193, 147, 0.1) transparent;
}

body {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(circle at 10% 10%, rgba(223, 193, 147, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(197, 168, 128, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(139, 168, 136, 0.03) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    letter-spacing: -0.1px;
}

/* Ambient Glowing Background Orbs - Optimized out to prevent CPU/GPU paint lag */
.glow-orb {
    display: none;
}

/* Layout App Container */
.app-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    width: 100%;
    max-width: 1600px;
    min-height: 100vh;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    background: rgba(11, 12, 15, 0.45);
}

/* Sidebar Navigation */
.sidebar {
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 3rem 2rem;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 10;
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    margin-bottom: 4rem;
}
.logo-icon {
    width: 42px;
    height: 42px;
    background: var(--gradient-accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}
.brand-text h2 {
    font-family: var(--font-heading);
    font-size: 2.1rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    line-height: 1.1;
    font-style: italic;
}
.brand-text h2 span {
    color: transparent;
    background: var(--gradient-accent);
    background-clip: text;
    -webkit-background-clip: text;
}
.brand .badge {
    font-size: 0.65rem;
    padding: 3px 8px;
    background: rgba(223, 193, 147, 0.06);
    border: 1px solid rgba(223, 193, 147, 0.15);
    border-radius: 20px;
    color: var(--accent-indigo);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 4px;
    display: inline-block;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex-grow: 1;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-secondary);
    padding: 0.85rem 1.1rem;
    border-radius: 12px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: left;
    transition: var(--transition-smooth);
}
.nav-item i {
    font-size: 1rem;
    transition: var(--transition-smooth);
}
.nav-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.02);
}
.nav-item.active {
    color: var(--text-primary);
    background: rgba(223, 193, 147, 0.05);
    border-left: 2px solid var(--accent-indigo);
    box-shadow: none;
}
.nav-item.active i {
    color: var(--accent-indigo);
}

.system-status {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1rem;
}
.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}
.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success);
    box-shadow: 0 0 10px var(--success);
    animation: pulse 1.8s infinite;
}
.status-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
    margin-left: 14px;
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.6; }
}

/* Main Content Area */
.main-content {
    padding: 2.5rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    overflow-y: auto;
}

/* Content Header */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.content-header .subtitle {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-indigo);
    display: block;
    margin-bottom: 0.3rem;
}
.content-header h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.8px;
    color: var(--text-primary);
}
.user-meta .datetime {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.6rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Tab Containers */
.tab-content {
    display: none;
    opacity: 0;
    transform: translateY(15px);
    transition: var(--transition-smooth);
}
.tab-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Bento Grid System */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.span-2 {
    grid-column: span 2;
}
.span-3 {
    grid-column: span 3;
}
.span-full {
    grid-column: span 3;
}

.bento-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}
.bento-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6);
}
.glow-border {
    box-shadow: none;
    border: 1px solid var(--border-color);
}
.glow-border:hover, .glow-border:focus-within {
    box-shadow: 0 10px 30px -10px rgba(223, 193, 147, 0.05);
    border-color: rgba(223, 193, 147, 0.15);
}

.card-header {
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
}
.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: rgba(223, 193, 147, 0.05);
    border: 1px solid rgba(223, 193, 147, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-indigo);
    font-size: 1.3rem;
}
.bento-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}
.card-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Forms & Inputs */
.search-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
}
.form-row.secondary {
    grid-template-columns: repeat(2, 1fr);
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.form-group label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
}
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.input-wrapper i {
    position: absolute;
    left: 1.2rem;
    color: var(--text-muted);
    font-size: 1rem;
    transition: var(--transition-smooth);
}
.input-wrapper input, select {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.9rem 1.2rem 0.9rem 3rem;
    color: white;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    outline: none;
}
select {
    padding-left: 1.2rem;
    padding-right: 2.8rem;
    cursor: pointer;
    appearance: none;
    background-color: #12141a;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23dfc193'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.2rem center;
    background-size: 1.1rem;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: var(--transition-smooth);
}
select:hover {
    border-color: rgba(223, 193, 147, 0.25);
    background-color: #161921;
}
select:focus {
    border-color: var(--accent-indigo);
    background-color: #161921;
    box-shadow: 0 0 15px rgba(223, 193, 147, 0.08);
}
select option {
    background-color: #14161c;
    color: var(--text-primary);
    padding: 0.8rem;
}
.input-wrapper input:focus, select:focus {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--accent-indigo);
    box-shadow: 0 0 15px rgba(223, 193, 147, 0.08);
}
.input-wrapper input:focus + i {
    color: var(--accent-indigo);
}

/* Custom Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    outline: none;
}
.btn-primary {
    background: var(--gradient-accent);
    border: none;
    color: #14161c;
    box-shadow: 0 6px 20px rgba(223, 193, 147, 0.15);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(223, 193, 147, 0.3);
}
.btn-primary:active {
    transform: translateY(0);
}
.btn-secondary {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.15);
}
.btn-loader {
    display: none;
}
.btn.loading .btn-loader {
    display: inline-block;
}
.btn.loading span {
    opacity: 0.7;
}

/* History List style */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 0.5rem;
}
.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.history-item:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(99, 102, 241, 0.2);
    transform: translateX(4px);
}
.history-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    max-width: 80%;
}
.history-item-keyword {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.history-item-domain {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.history-item-rank {
    font-size: 0.85rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
}
.history-item-rank.rank-ok {
    background: var(--success-bg);
    color: var(--success);
}
.history-item-rank.rank-none {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 3rem 1rem;
    color: var(--text-muted);
}
.empty-state i {
    font-size: 2.2rem;
    opacity: 0.4;
}
.empty-state p {
    font-size: 0.8rem;
}

/* Scanning / Loading UI Card */
.scanning-card {
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    animation: fadeIn 0.4s ease-out;
}
.loader-visual {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}
.scanning-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid rgba(223, 193, 147, 0.08);
    border-top: 2px solid var(--accent-indigo);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--accent-indigo);
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}
.scanning-circle.speed-2 {
    animation: spin 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    color: var(--accent-violet);
    border-top-color: var(--accent-violet);
}
.pulse-ring {
    display: none !important;
}
.scanner-line {
    display: none !important;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

/* Rank Checker Dashboard */
.result-dashboard {
    animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.dashboard-headline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
    gap: 1rem;
}
.result-badge-container {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}
.position-badge {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 500;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(223, 193, 147, 0.03);
    border: 1px solid rgba(223, 193, 147, 0.2);
    color: var(--accent-indigo);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}
.position-badge.not-found {
    background: transparent;
    border: 1px dashed var(--text-muted);
    color: var(--text-secondary);
    font-size: 1.6rem;
    border-radius: 50%;
    box-shadow: none;
}

.stats-counter-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.stat-counter {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.stat-counter .label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}
.stat-counter .val {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.stat-counter .val-link {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent-indigo);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
}
.stat-counter .val-link:hover {
    text-decoration: underline;
}

/* Results Table */
.results-table-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}
.results-table-container h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}
.results-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.results-table th {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border-color);
}
.results-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    font-size: 0.9rem;
    vertical-align: middle;
}
.results-table tr.highlight-match {
    background: rgba(99, 102, 241, 0.08);
}
.results-table tr.highlight-match td {
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}
.table-rank {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-secondary);
}
.results-table tr.highlight-match .table-rank {
    color: var(--accent-indigo);
}
.table-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    display: block;
}
.table-url {
    font-size: 0.75rem;
    color: var(--text-muted);
    word-break: break-all;
}
.results-table tr.highlight-match .table-url {
    color: rgba(99, 102, 241, 0.8);
}
.results-table .action-link {
    color: var(--text-muted);
    transition: var(--transition-smooth);
}
.results-table .action-link:hover {
    color: var(--accent-indigo);
}
.results-table tr.highlight-match .action-link {
    color: var(--accent-indigo);
}
.results-table tr.highlight-match .action-link:hover {
    color: var(--accent-pink);
}

/* Checklist Info on tab 2 */
.check-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    list-style: none;
}
.check-list li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.check-list li i {
    color: var(--accent-indigo);
}

/* Circular Progress Dashboard style */
.audit-header-dashboard {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2rem;
    margin-bottom: 1rem;
}
.score-circle-container {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.progress-ring {
    transform: rotate(-90deg);
}
.progress-ring__circle {
    transition: stroke-dashoffset 0.8s ease-in-out;
}
.score-number-display {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.score-number-display span {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1;
    color: white;
}
.score-number-display small {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 700;
    margin-top: 2px;
}

.audit-summary-info {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.url-badge {
    align-self: flex-start;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-indigo);
    word-break: break-all;
}
.audit-summary-info h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
}
.status-indicator-inline {
    font-weight: 700;
}
.status-indicator-inline.pass { color: var(--success); }
.status-indicator-inline.fail { color: var(--danger); }

/* Bento inner grids for report */
.bento-inner-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    margin-top: 0.5rem;
}
.flex-col {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

/* Detailed checklist cards */
.audit-checks-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.audit-check-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.01);
}
.audit-check-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.audit-check-item.pass { border-left: 4px solid var(--success); }
.audit-check-item.pass .audit-check-icon { background: var(--success-bg); color: var(--success); }
.audit-check-item.warning { border-left: 4px solid var(--warning); }
.audit-check-item.warning .audit-check-icon { background: var(--warning-bg); color: var(--warning); }
.audit-check-item.error { border-left: 4px solid var(--danger); }
.audit-check-item.error .audit-check-icon { background: var(--danger-bg); color: var(--danger); }

.audit-check-body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.audit-check-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}
.audit-check-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Meta details style */
.meta-item-box {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.meta-item-box .label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}
.value-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text-primary);
    word-break: break-word;
}
.font-medium {
    font-weight: 600;
}
.text-sm { font-size: 0.8rem; }
.text-dim { color: var(--text-secondary); }

/* Heading structure style */
.heading-summary-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.h-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}
.h-badge span {
    color: var(--accent-indigo);
    margin-left: 4px;
}
.headings-list-box {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.2rem;
    max-height: 250px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.heading-list-item {
    font-size: 0.85rem;
    line-height: 1.4;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(255,255,255,0.02);
    word-break: break-word;
}
.heading-list-item.h1 { padding-left: 0; font-weight: 700; color: white; }
.heading-list-item.h2 { padding-left: 1rem; color: var(--text-primary); }
.heading-list-item.h3 { padding-left: 2rem; color: var(--text-secondary); }
.heading-list-item.h4 { padding-left: 3rem; color: var(--text-muted); }

.card-divider {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}
.stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.stat-row strong {
    color: var(--text-primary);
}
.stat-row.danger {
    color: var(--danger);
}
.stat-row.danger strong {
    color: var(--danger);
    background: var(--danger-bg);
    padding: 1px 6px;
    border-radius: 4px;
}

/* LSI badge visual */
.lsi-badge-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem 1rem;
    background: rgba(255,255,255,0.01);
    border: 1px dashed var(--border-color);
    border-radius: 16px;
    margin-top: 0.5rem;
}
.lsi-dot {
    background: var(--gradient-accent);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
}
.lsi-dot:last-child {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}
.lsi-line {
    flex-grow: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-indigo), transparent);
    position: relative;
}
.lsi-line::after {
    content: '';
    position: absolute;
    right: 0;
    top: -3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

/* Keyword suggestions layouts */
.kw-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.2rem;
}
.count-badge {
    background: var(--success-bg);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--success);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
}
.keywords-flex-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 0.5rem;
}
.keyword-badge {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.8rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.keyword-badge i {
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}
.keyword-badge:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.1);
}
.keyword-badge:hover i {
    color: var(--accent-indigo);
    transform: scale(1.2);
}

/* Toast Notifications */
.toast-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(18, 20, 38, 0.95);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-left: 5px solid var(--danger);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(239, 68, 68, 0.1);
    border-radius: 14px;
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    z-index: 999;
    max-width: 420px;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.toast-notification.show {
    transform: translateX(0);
}
.toast-icon {
    font-size: 1.5rem;
    color: var(--danger);
}
.toast-body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.toast-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: white;
}
.toast-body p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}
.toast-close {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition-smooth);
    margin-left: 0.5rem;
}
.toast-close:hover {
    color: white;
}

/* Cookie Consent Banner */
.cookie-consent {
    position: fixed;
    bottom: -250px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 850px;
    background: rgba(18, 20, 38, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    z-index: 1000;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 35px rgba(99, 102, 241, 0.12);
    transition: bottom 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.cookie-consent.show {
    bottom: 2rem;
}
.cookie-content {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}
.cookie-banner-icon {
    font-size: 2.2rem;
    color: var(--accent-indigo);
    animation: floatCookie 3s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes floatCookie {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(6deg); }
}
.cookie-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.cookie-text h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
    color: white;
}
.cookie-text p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.45;
}
.cookie-buttons {
    display: flex;
    gap: 0.8rem;
    flex-shrink: 0;
}
.btn-sm {
    padding: 0.6rem 1.2rem !important;
    font-size: 0.85rem !important;
    border-radius: 10px !important;
}

@media (max-width: 768px) {
    .cookie-consent {
        flex-direction: column;
        align-items: stretch;
        gap: 1.2rem;
        padding: 1.2rem;
    }
    .cookie-buttons {
        justify-content: flex-end;
    }
}

/* Global animations & utility classes */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Print Overrides */
@media print {
    .sidebar, .glow-orb, .search-form, .history-list, .content-header .datetime, .result-actions, .cookie-consent {
        display: none !important;
    }
    .app-container {
        display: block;
        max-width: 100%;
        border: none;
    }
    .main-content {
        padding: 0;
        gap: 1rem;
    }
    .bento-grid {
        display: block;
    }
    .bento-card {
        background: white !important;
        color: black !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        margin-bottom: 2rem;
        page-break-inside: avoid;
    }
    .bento-card h3, .bento-card h4, .table-title, .table-rank, .score-number-display span {
        color: black !important;
    }
    .table-url, .card-desc {
        color: #555 !important;
    }
    .results-table th {
        color: black !important;
        border-bottom: 2px solid black !important;
    }
    .results-table td {
        border-bottom: 1px solid #eee !important;
    }
    .results-table tr.highlight-match {
        background: #f0f4ff !important;
    }
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .span-3, .span-2 {
        grid-column: span 2;
    }
    .bento-inner-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .bento-inner-grid .span-2 {
        grid-column: span 2;
    }
}

@media (max-width: 900px) {
    .app-container {
        grid-template-columns: 1fr;
    }
    .sidebar {
        height: auto;
        position: relative;
        padding: 1.5rem;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    .brand {
        margin-bottom: 1.5rem;
    }
    .nav-menu {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.4rem;
    }
    .nav-item {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    .system-status {
        display: none;
    }
    .main-content {
        padding: 1.5rem;
        gap: 1.5rem;
    }
    .content-header h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 600px) {
    .bento-grid, .bento-inner-grid {
        grid-template-columns: 1fr;
    }
    .span-3, .span-2, .bento-inner-grid .span-2, .span-full {
        grid-column: span 1;
    }
    .form-row, .form-row.secondary {
        grid-template-columns: 1fr;
    }
    .audit-header-dashboard {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
    }
    .stats-counter-row {
        grid-template-columns: 1fr;
    }
}
