/* ===== Design Tokens — Soft Green Warm Theme ===== */
:root {
    /* Primary — soft sage green */
    --primary:        #4CAF7D;
    --primary-light:  #6DBF94;
    --primary-vivid:  #3DA072;
    --primary-dark:   #2E7D32;
    --primary-gradient:    linear-gradient(135deg, #66BB6A 0%, #4CAF7D 50%, #81C784 100%);
    --primary-gradient-2:  linear-gradient(135deg, #4CAF7D 0%, #66BB6A 50%, #A5D6A7 100%);
    --primary-gradient-text: linear-gradient(135deg, #388E3C 0%, #4CAF7D 100%);

    /* Accent colors */
    --accent-cyan:    #26A69A;
    --accent-pink:    #EC407A;
    --accent-green:   #4CAF7D;
    --accent-orange:  #FFA726;
    --accent-red:     #EF5350;
    --accent-purple:  #AB47BC;

    /* Light surface palette */
    --bg-body:        #F4F9F6;
    --bg-primary:     #F4F9F6;
    --bg-surface-1:   #FFFFFF;
    --bg-surface:     #FFFFFF;
    --bg-surface-2:   #EDF5F0;
    --bg-surface-3:   #D7E8DE;
    --bg-input:       #F7FBF9;
    --bg-glass:       rgba(255, 255, 255, 0.75);
    --bg-glass-hover: rgba(255, 255, 255, 0.9);

    /* Text on light */
    --text-primary:   #2E4A3E;
    --text-secondary: #5A7A6D;
    --text-muted:     #8FA89C;
    --text-on-gradient: #FFFFFF;

    /* Shadows — soft green tint */
    --shadow-sm:       0 1px 3px rgba(76, 175, 125, 0.08);
    --shadow-md:       0 4px 12px rgba(76, 175, 125, 0.1);
    --shadow-lg:       0 8px 24px rgba(76, 175, 125, 0.14);
    --shadow-hover:    0 12px 32px rgba(76, 175, 125, 0.18);
    --shadow-glow:     0 4px 20px rgba(76, 175, 125, 0.2);
    --shadow-glow-cyan:0 4px 20px rgba(38, 166, 154, 0.2);
    --shadow-glow-red: 0 4px 20px rgba(239, 83, 80, 0.2);
    --shadow-glow-green:0 4px 20px rgba(76, 175, 125, 0.15);
    --shadow-glow-pink:0 4px 20px rgba(236, 64, 122, 0.2);
    --shadow-inner:    inset 0 1px 0 rgba(255, 255, 255, 0.6);

    /* Glass Borders */
    --border-glass:        1px solid rgba(76, 175, 125, 0.1);
    --border-glass-hover:  1px solid rgba(76, 175, 125, 0.25);
    --border-glass-active: 1px solid rgba(76, 175, 125, 0.4);

    /* Radii */
    --radius-sm:   8px;
    --radius-md:   12px;
    --radius-lg:   16px;
    --radius-xl:   24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast:  0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base:  0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow:  0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring:0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Blur */
    --blur-sm:  blur(8px);
    --blur-md:  blur(16px);
    --blur-lg:  blur(24px);
}

/* ===== Global ===== */
* { box-sizing: border-box; }

body {
    min-height: 100vh;
    background: var(--bg-body);
    font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Soft green background gradient */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(102, 187, 106, 0.08), transparent),
        radial-gradient(ellipse 60% 50% at 80% 60%, rgba(165, 214, 167, 0.1), transparent),
        radial-gradient(ellipse 50% 40% at 50% 20%, rgba(129, 199, 132, 0.06), transparent);
    pointer-events: none;
    z-index: 0;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes gradientShift {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

@keyframes modalEnter {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 6px rgba(76, 175, 125, 0.15); }
    50% { box-shadow: 0 0 16px rgba(76, 175, 125, 0.3); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes ripple {
    0% { transform: scale(0); opacity: 0.3; }
    100% { transform: scale(4); opacity: 0; }
}

.animate-fade-in-up { animation: fadeInUp 0.5s ease-out both; }
.animate-fade-in { animation: fadeIn 0.4s ease-out both; }

/* ===== Utility Classes ===== */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: var(--blur-lg);
    -webkit-backdrop-filter: var(--blur-lg);
    border: var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.glass-card-hover {
    background: var(--bg-glass);
    backdrop-filter: var(--blur-lg);
    -webkit-backdrop-filter: var(--blur-lg);
    border: var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.glass-card-hover:hover {
    border: var(--border-glass-hover);
    box-shadow: var(--shadow-md);
}

.text-gradient {
    background: var(--primary-gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glow-primary { box-shadow: var(--shadow-glow); }
.glow-cyan { box-shadow: var(--shadow-glow-cyan); }

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Navbar — White Frosted Glass ===== */
.navbar {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(76, 175, 125, 0.1);
    box-shadow: 0 1px 8px rgba(76, 175, 125, 0.06);
    padding: 0.65rem 0;
    position: sticky;
    top: 0;
    z-index: 1050;
    transition: all var(--transition-base);
}

.navbar.navbar-scrolled {
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.2rem;
    background: var(--primary-gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand:hover { opacity: 0.85; }

.navbar-toggler {
    border-color: rgba(76, 175, 125, 0.2) !important;
}

.navbar-toggler-icon {
    filter: none;
}

.nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    font-size: 0.88rem;
    padding: 0.45rem 0.9rem !important;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    margin: 0 0.1rem;
}

.nav-link:hover {
    color: var(--text-primary) !important;
    background: rgba(76, 175, 125, 0.06);
}

.nav-link.active {
    color: #fff !important;
    background: var(--primary-gradient);
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(76, 175, 125, 0.3);
}

/* Navbar search */
.search-bar-nav {
    position: relative;
}

.search-icon-nav {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-bar-nav input {
    background: var(--bg-surface-2);
    border: 1px solid rgba(76, 175, 125, 0.15);
    color: var(--text-primary);
}

.search-bar-nav input:focus {
    border-color: var(--primary-light) !important;
    box-shadow: 0 0 0 3px rgba(76, 175, 125, 0.1) !important;
    background: #fff !important;
}

.search-bar-nav input::placeholder { color: var(--text-muted); }

/* ===== Main Container — Wide Layout ===== */
.container.mt-4 {
    position: relative;
    z-index: 1;
}

.main-container {
    max-width: 100%;
    padding: 0 1.5rem;
}

/* ===== Cards — Warm White ===== */
.card {
    border: 1px solid rgba(76, 175, 125, 0.1);
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card:hover {
    border-color: rgba(76, 175, 125, 0.2);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header {
    background: var(--bg-surface-2);
    border-bottom: 1px solid rgba(76, 175, 125, 0.08);
    box-shadow: var(--shadow-inner);
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.card-body { padding: 1.25rem; }

/* ===== Website Cards — Warm Green Accent ===== */
.website-card {
    border-radius: var(--radius-md);
    border: 1px solid rgba(76, 175, 125, 0.08);
    padding: 1.1rem;
    background: var(--bg-surface);
    transition: all var(--transition-base);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.website-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(102, 187, 106, 0.04), rgba(165, 214, 167, 0.06));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.website-card:hover {
    border-color: rgba(76, 175, 125, 0.25);
    box-shadow: var(--shadow-glow);
    transform: translateY(-3px);
}

.website-card:hover::before { opacity: 1; }

.website-card .card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.website-card .card-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.website-card .card-link {
    font-size: 0.8rem;
    color: var(--accent-cyan);
    text-decoration: none;
    word-break: break-all;
}

.website-card .card-link:hover {
    color: #00897B;
    text-decoration: underline;
}

.website-card .meta-info {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.website-card .other-info {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed rgba(76, 175, 125, 0.12);
}

/* ===== Tag Chips ===== */
.tag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    position: relative;
    z-index: 1;
}

.tag-chip {
    font-size: 0.7rem;
    padding: 0.15rem 0.55rem;
    border-radius: var(--radius-full);
    background: rgba(76, 175, 125, 0.1);
    color: var(--primary-vivid);
    text-decoration: none;
    border: 1px solid rgba(76, 175, 125, 0.15);
    transition: all var(--transition-fast);
}

.tag-chip:hover {
    background: rgba(76, 175, 125, 0.2);
    color: var(--primary-vivid);
    border-color: rgba(76, 175, 125, 0.3);
}

/* ===== Tag Buttons ===== */
#tag-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

#tag-buttons .btn {
    border-radius: var(--radius-full);
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(76, 175, 125, 0.15);
    background: var(--bg-surface);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    cursor: pointer;
    text-decoration: none;
}

#tag-buttons .btn-primary {
    background: var(--primary-gradient);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 2px 10px rgba(76, 175, 125, 0.3);
}

#tag-buttons .btn-primary:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
    color: #fff;
}

#tag-buttons .btn-outline-primary {
    background: var(--bg-surface);
    border: 1px solid rgba(76, 175, 125, 0.15);
    color: var(--text-secondary);
}

#tag-buttons .btn-outline-primary:hover {
    border-color: rgba(76, 175, 125, 0.35);
    color: var(--primary-vivid);
    background: rgba(76, 175, 125, 0.06);
}

/* ===== Buttons ===== */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 2px 10px rgba(76, 175, 125, 0.25);
}

.btn-primary:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
    color: #fff;
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
}

.btn-secondary {
    background: var(--bg-surface-2);
    color: var(--text-secondary);
    border: 1px solid rgba(76, 175, 125, 0.12);
}

.btn-secondary:hover {
    background: var(--bg-surface-3);
    color: var(--text-primary);
}

.btn-danger {
    background: linear-gradient(135deg, #EF5350, #E53935);
    color: #fff;
    box-shadow: 0 2px 10px rgba(239, 83, 80, 0.25);
}

.btn-danger:hover {
    box-shadow: var(--shadow-glow-red);
    transform: translateY(-1px);
    color: #fff;
}

.btn-danger:active {
    transform: translateY(0) scale(0.98);
}

.btn-warning {
    background: linear-gradient(135deg, #FFA726, #FF7043);
    color: #fff;
    box-shadow: 0 2px 10px rgba(255, 167, 38, 0.25);
}

.btn-warning:hover {
    box-shadow: 0 4px 14px rgba(255, 167, 38, 0.35);
    transform: translateY(-1px);
    color: #fff;
}

.btn-success {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 2px 10px rgba(76, 175, 125, 0.25);
}

.btn-success:hover {
    box-shadow: 0 4px 14px rgba(76, 175, 125, 0.35);
    transform: translateY(-1px);
    color: #fff;
}

/* Ripple effect span */
.btn .ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

/* ===== Forms ===== */
.form-label {
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.form-control, .form-select {
    border-radius: var(--radius-sm);
    border: 1px solid rgba(76, 175, 125, 0.15);
    background: var(--bg-input);
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(76, 175, 125, 0.1);
    background: #fff;
    color: var(--text-primary);
    outline: none;
}

.form-control::placeholder { color: var(--text-muted); }

.form-text, .text-muted {
    color: var(--text-muted) !important;
    font-size: 0.78rem;
}

/* ===== Tables ===== */
.table {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0;
}

.table thead th {
    background: var(--bg-surface-2);
    border-bottom: 2px solid rgba(76, 175, 125, 0.1);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    z-index: 1;
}

.table tbody tr {
    transition: background 0.15s ease;
    cursor: pointer;
}

.table tbody tr:hover {
    background: rgba(76, 175, 125, 0.04);
}

.table tbody td {
    padding: 0.65rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid rgba(76, 175, 125, 0.06);
}

.table tbody tr.selected-row {
    background: rgba(239, 83, 80, 0.06);
    border-left: 3px solid var(--accent-red);
}

/* ===== Alerts ===== */
.alert {
    border-radius: var(--radius-md);
    border: none;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

.alert-info {
    background: rgba(38, 166, 154, 0.08);
    color: #00796B;
    border-left: 3px solid #26A69A;
}

.alert-warning {
    background: rgba(255, 167, 38, 0.08);
    color: #E65100;
    border-left: 3px solid #FFA726;
}

.alert-success {
    background: rgba(76, 175, 125, 0.08);
    color: #2E7D32;
    border-left: 3px solid #4CAF7D;
}

.alert-danger {
    background: rgba(239, 83, 80, 0.08);
    color: #C62828;
    border-left: 3px solid #EF5350;
}

/* ===== Messages Toast Container ===== */
.messages-toast-container {
    position: fixed;
    top: 80px;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 380px;
    pointer-events: none;
}

.messages-toast-container .alert {
    pointer-events: auto;
    animation: slideDown 0.3s ease-out;
    box-shadow: var(--shadow-md);
}

/* ===== Search Bar — Hero ===== */
.search-bar {
    position: relative;
    max-width: 560px;
    margin: 0 auto 1.5rem;
}

.search-bar input {
    width: 100%;
    padding: 0.85rem 1.25rem 0.85rem 3rem;
    border-radius: var(--radius-full);
    border: 1px solid rgba(76, 175, 125, 0.15);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-base);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(76, 175, 125, 0.1), var(--shadow-glow);
    background: #fff;
}

.search-bar input::placeholder { color: var(--text-muted); }

.search-bar .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* Search result indicator */
.search-result-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

/* ===== Icon Preview ===== */
#icon-preview, #icon_preview {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    object-fit: cover;
}

/* ===== Modal ===== */
.modal-content {
    background: var(--bg-surface);
    border: 1px solid rgba(76, 175, 125, 0.1);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    color: var(--text-primary);
}

.modal-header {
    border-bottom: 1px solid rgba(76, 175, 125, 0.08);
    padding: 1.25rem;
}

.modal-body { padding: 1.25rem; }

.modal-footer {
    border-top: 1px solid rgba(76, 175, 125, 0.08);
    padding: 1rem 1.25rem;
}

.modal.fade.show .modal-dialog { animation: modalEnter 0.25s ease-out; }

.btn-close {
    filter: none;
}

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.stats-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-surface-2);
    border: 1px solid rgba(76, 175, 125, 0.08);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.stats-card:hover {
    background: rgba(76, 175, 125, 0.06);
    border-color: rgba(76, 175, 125, 0.18);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.stats-card .name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.stats-card .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--primary-gradient);
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
}

/* ===== Checkbox ===== */
.form-check-input {
    border-radius: 4px;
    border: 1.5px solid rgba(76, 175, 125, 0.25);
    background: #fff;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-check-input:checked {
    background: var(--primary-vivid);
    border-color: var(--primary-vivid);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(76, 175, 125, 0.15);
    border-color: var(--primary-light);
}

/* ===== Footer ===== */
.site-footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid rgba(76, 175, 125, 0.08);
}

.site-footer .footer-brand {
    font-weight: 800;
    font-size: 1.15rem;
    background: var(--primary-gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.site-footer .footer-tagline {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

.site-footer .footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer .footer-links li {
    margin-bottom: 0.4rem;
}

.site-footer .footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color var(--transition-fast);
}

.site-footer .footer-links a:hover {
    color: var(--primary-vivid);
}

.site-footer .footer-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.site-footer .footer-stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    background: var(--bg-surface-2);
    border: 1px solid rgba(76, 175, 125, 0.1);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.site-footer .footer-stat-badge .count {
    font-weight: 700;
    color: var(--primary-vivid);
}

.site-footer .footer-bottom {
    border-top: 1px solid rgba(76, 175, 125, 0.06);
    padding-top: 1.5rem;
    margin-top: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ===== Hero Section ===== */
.hero-section {
    text-align: center;
    padding: 1.5rem 0 1rem;
    position: relative;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 40% at 50% 50%, rgba(129, 199, 132, 0.12), transparent 70%);
    pointer-events: none;
    z-index: -1;
    animation: gradientShift 8s ease-in-out infinite;
}

/* ===== Section Headers ===== */
.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    background: var(--primary-gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header .line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(76, 175, 125, 0.25), transparent);
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.empty-state p {
    font-size: 1rem;
    margin: 0;
}

/* ===== Manual Page ===== */
.manual-section {
    animation: fadeInUp 0.4s ease-out both;
    position: relative;
    padding-left: 1rem;
}

.manual-section::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

.manual-section:nth-child(2) { animation-delay: 0.1s; }
.manual-section:nth-child(3) { animation-delay: 0.15s; }
.manual-section:nth-child(4) { animation-delay: 0.2s; }

.manual-section h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.manual-section h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-vivid);
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.manual-section p, .manual-section li {
    color: var(--text-secondary);
    line-height: 1.7;
}

.manual-table {
    border-radius: var(--radius-md);
    overflow: hidden;
}

.manual-table thead th {
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    font-size: 0.85rem;
}

.manual-table tbody td {
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(76, 175, 125, 0.06);
}

.badge.bg-danger {
    background: linear-gradient(135deg, #EF5350, #E53935) !important;
}

.badge.bg-secondary {
    background: var(--bg-surface-3) !important;
    color: var(--text-secondary);
}

/* ===== Stat Badge (legacy) ===== */
.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-surface-2);
    border: 1px solid rgba(76, 175, 125, 0.08);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
}

.stat-badge .count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: var(--primary-gradient);
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0 0.5rem;
}

/* ===== Delete Confirm Partial ===== */
.delete-confirm-box {
    background: var(--bg-surface);
    border: 1px solid rgba(239, 83, 80, 0.15);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    animation: scaleIn 0.3s ease-out;
    box-shadow: var(--shadow-lg);
}

.delete-confirm-box .alert-danger {
    background: rgba(239, 83, 80, 0.08);
    border-left: 3px solid var(--accent-red);
    color: #C62828;
}

.delete-item-list {
    max-height: 200px;
    overflow-y: auto;
    margin: 1rem 0;
}

.delete-item {
    padding: 0.5rem 0.75rem;
    background: var(--bg-surface-2);
    border: 1px solid rgba(76, 175, 125, 0.08);
    border-radius: var(--radius-sm);
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Delete success partial */
.delete-status-success {
    background: rgba(76, 175, 125, 0.08);
    border: 1px solid rgba(76, 175, 125, 0.15);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    color: #2E7D32;
    font-size: 0.9rem;
    animation: scaleIn 0.3s ease-out;
}

/* ===== Batch Replace Arrow ===== */
.replace-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 0;
    color: var(--text-muted);
}

.replace-arrow i {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .website-card { padding: 0.9rem; }
    .search-bar-nav input { width: 160px !important; }
    .site-footer .footer-col { margin-bottom: 1.5rem; }
}

@media (max-width: 768px) {
    .hero-section { padding: 1rem 0 0.75rem; }
    .search-bar input { padding: 0.7rem 1rem 0.7rem 2.5rem; font-size: 0.9rem; }
    #tag-buttons .btn { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
    .card { border-radius: var(--radius-md); }
    .card-body { padding: 1rem; }
    .website-card { padding: 0.75rem; }
    .stats-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .navbar-brand { font-size: 1rem; }
    .nav-link { padding: 0.4rem 0.75rem !important; font-size: 0.85rem; }
    .main-container { padding: 0 1rem; }
}

@media (max-width: 480px) {
    .navbar-brand { font-size: 0.95rem; }
    .website-card .card-title { font-size: 0.88rem; }
    .main-container { padding: 0 0.75rem; }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-surface-2); }
::-webkit-scrollbar-thumb { background: var(--bg-surface-3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ===== Badge ===== */
.badge {
    font-weight: 600;
    font-size: 0.78rem;
}

/* ===== Edit Mode Bar ===== */
.edit-mode-bar {
    display: flex;
    flex-direction: row;
    direction: ltr;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    background: linear-gradient(135deg, rgba(255, 167, 38, 0.15), rgba(255, 112, 67, 0.1));
    border: 2px solid rgba(255, 167, 38, 0.45);
    border-left: 6px solid var(--accent-orange);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(255, 167, 38, 0.25);
    animation: pulseGlowOrange 2.5s ease-in-out infinite;
    margin-bottom: 1.25rem;
}

.edit-mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1rem;
    color: #BF360C;
    letter-spacing: 0.01em;
}

.btn-back-to-add {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.25rem;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #EF5350, #FF7043);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    box-shadow: 0 3px 12px rgba(239, 83, 80, 0.35);
    transition: all var(--transition-fast);
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-back-to-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 83, 80, 0.45);
    color: #fff;
}

.btn-back-to-add:active {
    transform: translateY(0) scale(0.97);
}

@keyframes pulseGlowOrange {
    0%, 100% { box-shadow: 0 4px 20px rgba(255, 167, 38, 0.25); }
    50% { box-shadow: 0 4px 30px rgba(255, 167, 38, 0.45); }
}

/* ===== Links ===== */
a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: #00897B;
}

/* Pagination */
.page-link {
    background: var(--bg-surface);
    border-color: rgba(76, 175, 125, 0.1);
    color: var(--text-secondary);
}

.page-link:hover {
    background: var(--bg-surface-2);
    color: var(--text-primary);
}

.page-item.active .page-link {
    background: var(--primary-gradient);
    border-color: transparent;
    color: #fff;
}

/* ===== Icon image in cards ===== */
.website-icon {
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 8px rgba(76, 175, 125, 0.1);
    object-fit: cover;
    transition: box-shadow var(--transition-base);
}

.website-card:hover .website-icon {
    box-shadow: var(--shadow-glow);
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ===== Tag Chips (add/edit page) ===== */
.tag-chip {
    display: inline-block;
    padding: 2px 10px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    background: var(--bg-surface-2);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}
.tag-chip:hover {
    background: var(--primary);
    color: #fff;
}
.tag-chip-active {
    background: var(--primary) !important;
    color: #fff !important;
}
