/* ============================================
   NAVIQ — Global Styles
   ============================================ */

:root {
    --bg: #F8FAF9;
    --bg-alt: #F1F5F4;
    --surface: #FFFFFF;
    --surface-hover: #F5F9F8;
    --text: #2D3748;
    --text-secondary: #718096;
    --text-muted: #A0AEC0;
    --accent: #48BB78;
    --accent-light: #E6FFFA;
    --accent-dark: #38A169;
    --mint: #48BB78;
    --mint-light: #E6FFFA;
    --blue: #4299E1;
    --blue-light: #EBF8FF;
    --yellow: #ED8936;
    --yellow-light: #FEFCBF;
    --lavender: #9F7AEA;
    --lavender-light: #F6F3FF;
    --pink: #F56565;
    --pink-light: #FED7D7;
    --border: #E2E8F0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.08);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.1);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --font-display: 'DM Serif Display', Georgia, serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
    --font-mono: 'DM Mono', monospace;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea { font-family: inherit; }

/* Scroll Progress */
.scroll-progress {
    position: fixed; top: 0; left: 0;
    height: 3px; width: 0;
    background: linear-gradient(90deg, var(--accent), var(--mint));
    z-index: 1001;
    transition: width 0.1s linear;
}

/* ============================================
   HEADER
   ============================================ */
header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(250, 248, 245, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.3s var(--ease);
}
header.scrolled { box-shadow: var(--shadow-sm); }

.header-inner {
    max-width: 1200px; margin: 0 auto;
    padding: 0 24px; height: 60px;
    display: flex; align-items: center; justify-content: space-between;
}

.logo {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--font-display); font-size: 1.25rem;
    color: var(--text);
}
.logo svg { flex-shrink: 0; }

nav { display: flex; gap: 8px; }
nav a {
    padding: 6px 16px; border-radius: 100px;
    font-size: 0.875rem; font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s var(--ease);
}
nav a:hover { color: var(--text); background: var(--bg-alt); }
nav a.active { color: var(--accent); background: var(--accent-light); }

.header-time {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* ============================================
   SEARCH SECTION
   ============================================ */
.search-section {
    max-width: 720px; margin: 0 auto;
    padding: 48px 24px 48px;
    text-align: center;
    animation: fadeUp 0.6s var(--ease) both;
}

.search-greeting {
    font-size: 0.9rem; font-weight: 500;
    color: var(--accent); margin-bottom: 8px;
    letter-spacing: 0.5px; text-transform: uppercase;
}

.search-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 400; line-height: 1.2;
    margin-bottom: 32px; color: var(--text);
}

.search-container { position: relative; }

.search-engine-toggle {
    display: inline-flex; align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px; padding: 4px;
    margin-bottom: 16px; position: relative;
    box-shadow: var(--shadow-sm);
}

.search-engine-indicator {
    position: absolute; top: 4px; left: 4px;
    width: calc(50% - 4px); height: calc(100% - 8px);
    background: var(--accent-light);
    border-radius: 100px;
    transition: transform 0.3s var(--ease);
    z-index: 0;
}
.search-engine-indicator.bing { transform: translateX(100%); }

.search-engine-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 20px; border-radius: 100px;
    font-size: 0.85rem; font-weight: 600;
    color: var(--text-secondary);
    position: relative; z-index: 1;
    transition: color 0.2s var(--ease);
}
.search-engine-btn.active { color: var(--accent); }
.search-engine-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.search-input-wrap {
    display: flex; align-items: center;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 4px 4px 4px 20px;
    box-shadow: var(--shadow-md);
    transition: border-color 0.2s var(--ease), box-shadow 0.3s var(--ease);
}
.search-input-wrap:focus-within {
    border-color: var(--accent);
    box-shadow: var(--shadow-lg), 0 0 0 4px var(--accent-light);
}

.search-icon { flex-shrink: 0; margin-right: 12px; }

.search-input {
    flex: 1; border: none; outline: none;
    font-size: 1rem; background: transparent;
    color: var(--text); min-width: 0;
}
.search-input::placeholder { color: var(--text-muted); }

.search-submit {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--accent);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s var(--ease), transform 0.15s var(--ease);
}
.search-submit:hover { background: var(--accent-dark); transform: scale(1.05); }

/* ============================================
   DASHBOARD ROW (Weather + Links)
   ============================================ */
.dashboard-row {
    max-width: 1200px; margin: 0 auto;
    padding: 0 24px 40px;
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 24px;
    animation: fadeUp 0.6s var(--ease) 0.15s both;
}

/* Weather */
.weather-card {
    position: relative; border-radius: var(--radius-lg);
    overflow: hidden; min-height: 220px;
    box-shadow: var(--shadow-md);
}
.weather-bg {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, #48BB78 0%, #68D391 50%, #9AE6B4 100%);
    opacity: 0.95;
}
.weather-bg::after {
    content: ''; position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.weather-content {
    position: relative; z-index: 1;
    padding: 28px; color: #fff;
    display: flex; flex-direction: column;
    justify-content: space-between; min-height: 220px;
}
.weather-loading {
    display: flex; align-items: center; justify-content: center;
    height: 100%; font-size: 0.9rem; opacity: 0.8;
}
.weather-top { display: flex; justify-content: space-between; align-items: flex-start; }
.weather-temp {
    font-family: var(--font-display);
    font-size: 3.5rem; line-height: 1;
    margin-bottom: 4px;
}
.weather-desc { font-size: 0.95rem; opacity: 0.9; }
.weather-icon { font-size: 3rem; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.2)); }
.weather-bottom { margin-top: auto; }
.weather-loc { font-weight: 600; margin-bottom: 4px; font-size: 0.95rem; }
.weather-detail {
    display: flex; gap: 16px;
    font-size: 0.8rem; opacity: 0.8;
}

/* Quick Links */
.quick-links {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.quick-links-header h2 {
    font-family: var(--font-display);
    font-size: 1.3rem; margin-bottom: 16px;
}
.links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.link-card {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 10px; padding: 20px 12px;
    border-radius: var(--radius-md);
    transition: all 0.25s var(--ease);
    border: 1px solid transparent;
}
.link-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.lc-1 { background: #F5F5F5; } .lc-1:hover { border-color: #333; }
.lc-2 { background: #FFF0F0; } .lc-2:hover { border-color: #FF0000; }
.lc-3 { background: #F0F0F5; } .lc-3:hover { border-color: #1DA1F2; }
.lc-4 { background: #FFF5EC; } .lc-4:hover { border-color: #FF4500; }
.lc-5 { background: #EEF4FF; } .lc-5:hover { border-color: #0A66C2; }
.lc-6 { background: #FFF8F0; } .lc-6:hover { border-color: #EA4335; }

.link-icon {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
}
.link-label {
    font-size: 0.78rem; font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
}

/* ============================================
   NEWS SECTION
   ============================================ */
.news-section {
    max-width: 1200px; margin: 0 auto;
    padding: 0 24px 48px;
    animation: fadeUp 0.6s var(--ease) 0.3s both;
}

.section-header {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 24px;
}
.section-header h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
}
.section-badge {
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px;
    background: var(--accent);
    color: #fff; padding: 3px 10px;
    border-radius: 100px;
    animation: pulse 2s infinite;
}

.news-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 20px;
}

.news-loading {
    grid-column: 1 / -1;
    display: flex; align-items: center; justify-content: center;
    gap: 12px; padding: 60px 0;
    color: var(--text-muted); font-size: 0.9rem;
}

.spinner {
    width: 24px; height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* News Featured (first item) */
.news-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s var(--ease);
    display: flex; flex-direction: column;
}
.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.news-card.featured {
    grid-row: 1 / 3;
}
.news-card.featured .news-img {
    height: 260px;
}

.news-img {
    width: 100%; height: 160px;
    object-fit: cover;
    background: var(--bg-alt);
}

.news-body {
    padding: 20px; flex: 1;
    display: flex; flex-direction: column;
}
.news-source {
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px;
    color: var(--accent); margin-bottom: 8px;
}
.news-title {
    font-weight: 700; font-size: 1rem;
    line-height: 1.4; margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-card.featured .news-title {
    font-size: 1.2rem;
    -webkit-line-clamp: 4;
}
.news-desc {
    font-size: 0.85rem; color: var(--text-secondary);
    line-height: 1.5; margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
.news-link {
    font-size: 0.8rem; font-weight: 600;
    color: var(--accent);
    display: inline-flex; align-items: center; gap: 4px;
    margin-top: auto;
    transition: gap 0.2s var(--ease);
}
.news-link:hover { gap: 8px; }

/* Right column small cards */
.news-right {
    display: flex; flex-direction: column; gap: 20px;
}
.news-right .news-card {
    flex-direction: row;
}
.news-right .news-img {
    width: 120px; height: auto;
    min-height: 120px; flex-shrink: 0;
}
.news-right .news-body { padding: 16px; }
.news-right .news-title { font-size: 0.9rem; -webkit-line-clamp: 2; }
.news-right .news-desc { display: none; }

/* ============================================
   TOOLS SECTION
   ============================================ */
.tools-section {
    max-width: 1200px; margin: 0 auto;
    padding: 0 24px 64px;
    animation: fadeUp 0.6s var(--ease) 0.45s both;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.tool-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s var(--ease);
}
.tool-card:hover { box-shadow: var(--shadow-md); }

.tool-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px;
}
.tool-header h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
}
.tool-badge {
    font-size: 0.65rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px;
    padding: 3px 10px; border-radius: 100px;
    background: var(--mint-light); color: var(--mint);
}

/* Calculator */
.calc-display {
    font-family: var(--font-mono);
    font-size: 2rem; font-weight: 500;
    text-align: right; padding: 16px 20px;
    background: var(--bg-alt);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    overflow: hidden; text-overflow: ellipsis;
    min-height: 60px; display: flex;
    align-items: center; justify-content: flex-end;
    word-break: break-all;
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.calc-btn {
    padding: 14px 0; border-radius: var(--radius-sm);
    font-size: 1.1rem; font-weight: 600;
    background: var(--bg-alt);
    color: var(--text);
    transition: all 0.15s var(--ease);
    border: 1px solid transparent;
}
.calc-btn:hover { background: var(--border); }
.calc-btn:active { transform: scale(0.95); }
.calc-op { color: var(--accent); background: var(--accent-light); }
.calc-op:hover { background: #ffe0d6; }
.calc-clear { color: #E53E3E; background: #FFF5F5; }
.calc-clear:hover { background: #FFE5E5; }
.calc-equals { background: var(--accent); color: #fff; }
.calc-equals:hover { background: var(--accent-dark); }
.calc-zero { grid-column: span 2; }

/* Timer */
.timer-display {
    font-family: var(--font-mono);
    font-size: 2.8rem; font-weight: 500;
    text-align: center; padding: 20px 0;
    color: var(--text);
    letter-spacing: 2px;
}
.timer-display.running { color: var(--mint); }
.timer-display.paused { color: var(--yellow); }

.timer-inputs {
    display: flex; align-items: center;
    justify-content: center; gap: 8px;
    margin-bottom: 16px;
}
.timer-input-group { text-align: center; }
.timer-input-group input {
    width: 60px; text-align: center;
    font-family: var(--font-mono);
    font-size: 1.1rem; padding: 8px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s var(--ease);
}
.timer-input-group input:focus { border-color: var(--accent); }
.timer-input-group label {
    display: block; font-size: 0.65rem;
    color: var(--text-muted); margin-top: 4px;
    font-weight: 600; letter-spacing: 1px;
}
.timer-sep {
    font-family: var(--font-mono);
    font-size: 1.2rem; color: var(--text-muted);
    margin-bottom: 16px;
}

.timer-bar-wrap {
    height: 4px; background: var(--bg-alt);
    border-radius: 2px; margin-bottom: 20px;
    overflow: hidden;
}
.timer-bar {
    height: 100%; width: 0;
    background: linear-gradient(90deg, var(--mint), var(--accent));
    border-radius: 2px;
    transition: width 1s linear;
}

.timer-controls {
    display: flex; gap: 10px; justify-content: center;
}
.timer-btn {
    padding: 10px 28px; border-radius: 100px;
    font-size: 0.85rem; font-weight: 700;
    transition: all 0.2s var(--ease);
}
.timer-start { background: var(--mint); color: #fff; }
.timer-start:hover { background: #00b396; }
.timer-pause { background: var(--yellow); color: #fff; }
.timer-pause:hover { background: #e6a645; }
.timer-reset { background: var(--bg-alt); color: var(--text-secondary); }
.timer-reset:hover { background: var(--border); }

/* Color Picker */
.color-preview-area {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 20px;
}
.color-preview-area input[type="color"] {
    width: 56px; height: 56px;
    border: none; border-radius: var(--radius-sm);
    cursor: pointer; padding: 0;
    -webkit-appearance: none;
}
.color-preview-area input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-preview-area input[type="color"]::-webkit-color-swatch { border: 2px solid var(--border); border-radius: var(--radius-sm); }

.color-swatch {
    flex: 1; height: 56px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: background 0.3s var(--ease);
}

.color-values { display: flex; flex-direction: column; gap: 10px; }
.color-row {
    display: flex; align-items: center; gap: 12px;
}
.color-row label {
    font-size: 0.7rem; font-weight: 700;
    color: var(--text-muted); width: 32px;
    letter-spacing: 1px;
}
.color-val-wrap {
    flex: 1; display: flex; gap: 6px;
}
.color-val-wrap input {
    flex: 1; padding: 8px 12px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    outline: none;
}
.copy-btn {
    padding: 8px 14px; border-radius: var(--radius-sm);
    font-size: 0.75rem; font-weight: 700;
    background: var(--accent-light); color: var(--accent);
    transition: all 0.2s var(--ease);
    white-space: nowrap;
}
.copy-btn:hover { background: var(--accent); color: #fff; }
.copy-btn.copied { background: var(--mint-light); color: var(--mint); }

/* Notes */
.notes-textarea {
    width: 100%; min-height: 160px;
    padding: 16px; border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.9rem; line-height: 1.7;
    resize: vertical; outline: none;
    background: var(--bg);
    color: var(--text);
    transition: border-color 0.2s var(--ease);
}
.notes-textarea:focus { border-color: var(--accent); }
.notes-textarea::placeholder { color: var(--text-muted); }

.notes-footer {
    display: flex; justify-content: space-between;
    margin-top: 10px; font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    border-top: 1px solid var(--border);
    background: var(--surface);
}
.footer-inner {
    max-width: 1200px; margin: 0 auto;
    padding: 24px;
    display: flex; align-items: center; justify-content: space-between;
    font-size: 0.8rem; color: var(--text-muted);
}
.footer-links { display: flex; gap: 20px; }
.footer-links a { transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }

/* ============================================   CONTENT PAGES (Privacy / Terms)   ============================================ */.content-page {
    max-width: 780px; margin: 0 auto;
    padding: 20px 10px 20px;
    animation: fadeUp 0.5s var(--ease) both;
}
.content-page h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 2.8rem);
    margin-bottom: 8px;
    color: var(--accent);
    line-height: 1.2;
}
.content-page .page-date {
    font-size: 0.85rem; color: var(--text-muted);
    margin-bottom: 40px;
}
.content-page h2 {
    font-family: var(--font-display);
    font-size: 1.4rem; margin: 36px 0 14px;
    color: var(--text);
}
.content-page p {
    font-size: 0.95rem; color: var(--text-secondary);
    line-height: 1.8; margin-bottom: 16px;
}
.content-page ul {
    margin: 0 0 16px 20px;
    color: var(--text-secondary);
    font-size: 0.95rem; line-height: 1.8;
}
.content-page a { color: var(--accent); }
.content-page a:hover { text-decoration: underline; }

/* Legal Content Styles */
.legal-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 48px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    animation: fadeUp 0.5s var(--ease) both;
}

.legal-content h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 16px;
    color: var(--text);
    line-height: 1.2;
}

.legal-content h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    margin: 40px 0 20px;
    color: var(--text);
    line-height: 1.2;
}

.legal-content h3 {
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 32px 0 16px;
    color: var(--text);
    line-height: 1.3;
}

.legal-content p {
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.legal-content .last-updated {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.legal-content .table-of-contents {
    background: var(--bg-alt);
    border-radius: var(--radius-md);
    padding: 32px;
    margin: 40px 0;
    border-left: 4px solid var(--accent);
}

.legal-content .table-of-contents h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--text);
    font-weight: 600;
}

.legal-content .table-of-contents ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.legal-content .table-of-contents li {
    margin-bottom: 12px;
}

.legal-content .table-of-contents a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s var(--ease);
    display: block;
    padding: 4px 0;
}

.legal-content .table-of-contents a:hover {
    color: var(--accent);
    transform: translateX(4px);
}

.legal-content .legal-section,
.legal-content .title {
    margin-bottom: 40px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border);
}

.legal-content .legal-section:last-child,
.legal-content .title:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.legal-content ol {
    margin: 0 0 20px 28px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
}

.legal-content ol li {
    margin-bottom: 12px;
}

.legal-content ul {
    margin: 0 0 20px 24px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
}

.legal-content ul li {
    margin-bottom: 12px;
}

.legal-content strong {
    color: var(--text);
    font-weight: 600;
}

.legal-content a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s var(--ease);
}

.legal-content a:hover {
    color: var(--accent-dark);
    text-decoration: underline;
}

.legal-content .btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--accent);
    color: white;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s var(--ease);
    text-decoration: none;
}

.legal-content .btn:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Main Content Container */
.main-content {
    padding: 20px 0 20px;
}

.main-content .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.content-page-footer {
    margin-top: 30px;
    text-align: center;
}

.content-page-footer .btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--accent);
    color: white;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s var(--ease);
    text-decoration: none;
}

.content-page-footer .btn:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Scroll reveal */
.reveal {
    opacity: 0; transform: translateY(20px);
    transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.reveal.visible {
    opacity: 1; transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .dashboard-row {
        grid-template-columns: 1fr;
    }
    .weather-card { min-height: 180px; }
    .links-grid { grid-template-columns: repeat(3, 1fr); }
    .news-grid {
        grid-template-columns: 1fr;
    }
    .news-card.featured { grid-row: auto; }
    .news-right {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    .news-right .news-card { flex-direction: column; }
    .news-right .news-img { width: 100%; height: 120px; }
    .tools-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .header-inner { padding: 0 16px; }
    .header-time { display: none; }
    nav a { padding: 6px 10px; font-size: 0.8rem; }

    .search-section { padding: 32px 16px 32px; }
    .search-title { font-size: 1.8rem; }
    .search-engine-btn { padding: 6px 14px; font-size: 0.8rem; }

    .dashboard-row { padding: 0 16px 24px; gap: 16px; }
    .links-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .link-card { padding: 14px 8px; }
    .link-icon { width: 36px; height: 36px; }
    .link-icon svg { width: 20px; height: 20px; }
    .link-label { font-size: 0.7rem; }

    .news-section { padding: 0 16px 32px; }
    .news-right {
        grid-template-columns: 1fr;
    }
    .news-right .news-card { flex-direction: row; }
    .news-right .news-img { width: 100px; height: auto; min-height: 100px; }

    .tools-section { padding: 0 16px 48px; }
    .tools-grid { grid-template-columns: 1fr; gap: 16px; }

    .calc-display { font-size: 1.6rem; padding: 12px 16px; }
    .calc-btn { padding: 12px 0; font-size: 1rem; }

    .timer-display { font-size: 2rem; }
    .timer-input-group input { width: 50px; }

    .content-page { padding: 20px 5px 30px; }

    .legal-content {
        padding: 32px 20px;
    }

    .legal-content h1 {
        font-size: 1.6rem;
    }

    .legal-content h2 {
        font-size: 1.4rem;
        margin: 32px 0 16px;
    }

    .legal-content h3 {
        font-size: 1.1rem;
        margin: 28px 0 14px;
    }

    .legal-content p {
        font-size: 0.9rem;
        line-height: 1.7;
        margin-bottom: 16px;
    }

    .legal-content .table-of-contents {
        padding: 24px 16px;
        margin: 32px 0;
    }

    .legal-content .table-of-contents li {
        margin-bottom: 8px;
    }

    .legal-content .table-of-contents a {
        font-size: 0.9rem;
    }

    .legal-content .legal-section,
    .legal-content .title {
        margin-bottom: 32px;
        padding-bottom: 24px;
    }

    .legal-content ol {
        margin: 0 0 16px 24px;
    }

    .legal-content ul {
        margin: 0 0 16px 20px;
    }

    .legal-content ol li,
    .legal-content ul li {
        margin-bottom: 8px;
    }

    .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
}
