/* =========================================================
   Light/White Theme - Investment & Assets Style
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    /* Color Palette */
    --bg-main: #f8fafc;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    
    --primary-green: #10b981;
    --primary-blue: #2563eb;
    --primary-dark: #0f172a;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.06), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    --shadow-hover: 0 20px 35px -10px rgba(16, 185, 129, 0.15), 0 10px 15px -5px rgba(37, 99, 235, 0.1);
    
    --accent-gradient: linear-gradient(135deg, #10b981 0%, #059669 50%, #2563eb 100%);
    --bg-gradient: radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 0.08) 0%, rgba(37, 99, 235, 0.05) 35%, rgba(248, 250, 252, 1) 70%);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    background-color: var(--bg-main);
    background-image: 
        var(--bg-gradient),
        /* Investment/Asset Chart Watermark Grid Pattern */
        linear-gradient(rgba(226, 232, 240, 0.5) 1px, transparent 1px),
        linear-gradient(90deg, rgba(226, 232, 240, 0.5) 1px, transparent 1px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
    background-position: 0 0, -1px -1px, -1px -1px;
    color: var(--text-primary);
    line-height: 1.6;
    padding: 30px 20px;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Background Animated Asset Glow Blobs */
body::before, body::after {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    filter: blur(90px);
    z-index: -1;
    opacity: 0.6;
    animation: floatGlow 10s infinite alternate cubic-bezier(0.45, 0, 0.55, 1);
}

body::before {
    top: -50px;
    right: -50px;
    background: rgba(16, 185, 129, 0.2);
}

body::after {
    top: 400px;
    left: -100px;
    background: rgba(37, 99, 235, 0.15);
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    animation: pageFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Back Button */
.top-nav {
    margin-bottom: 30px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 24px;
    background: #ffffff;
    color: var(--primary-dark);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.back-btn:hover {
    transform: translateY(-3px) scale(1.02);
    border-color: var(--primary-green);
    color: var(--primary-green);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.12);
}

.back-btn .btn-icon {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.back-btn:hover .btn-icon {
    transform: translateX(-5px);
}

/* Main Header */
.main-header {
    text-align: center;
    margin-bottom: 45px;
    position: relative;
}

.header-badge {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: 1px solid rgba(16, 185, 129, 0.25);
    display: inline-block;
    margin-bottom: 16px;
    box-shadow: inset 0 0 10px rgba(16, 185, 129, 0.05);
    animation: badgePulse 3s infinite;
}

.main-header h1 {
    font-size: 2.3rem;
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: -0.5px;
    margin-bottom: 14px;
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 680px;
    margin: 0 auto;
    font-weight: 500;
}

/* Category Cards */
.categories-wrapper {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.category-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card:hover {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

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

/* Category Header (Accordion Toggle) */
.category-header {
    padding: 22px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    list-style: none;
    user-select: none;
    background: #ffffff;
    transition: background 0.3s ease;
}

.category-header::-webkit-details-marker {
    display: none;
}

.category-header:hover {
    background: #f8fafc;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cat-icon {
    font-size: 1.8rem;
    background: #f1f5f9;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s ease;
}

.category-card:hover .cat-icon {
    transform: scale(1.1) rotate(-3deg);
    background: rgba(16, 185, 129, 0.1);
}

.category-title h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-dark);
}

/* Toggle Arrow Icon */
.toggle-icon {
    width: 10px;
    height: 10px;
    border-right: 2.5px solid var(--text-secondary);
    border-bottom: 2.5px solid var(--text-secondary);
    transform: rotate(45deg);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-right: 5px;
}

.category-card[open] .toggle-icon {
    transform: rotate(-135deg);
    border-color: var(--primary-green);
}

.category-card[open] {
    border-color: rgba(16, 185, 129, 0.3);
}

.category-card[open]::before {
    opacity: 1;
}

/* Category Body & Cards Grid */
.category-body {
    padding: 0 28px 28px 28px;
    animation: accordionExpand 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 16px;
    margin-top: 10px;
}

/* Individual Item Cards */
.item-card {
    background: #f8fafc;
    border: 1px solid #edf2f7;
    padding: 18px 20px;
    border-radius: 14px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.item-card:hover {
    background: #ffffff;
    transform: translateY(-4px);
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.06);
}

.item-card h4 {
    color: var(--primary-dark);
    font-size: 0.98rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.item-card h4::after {
    content: '↗';
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.item-card:hover h4::after {
    color: var(--primary-green);
    transform: translate(2px, -2px);
}

.item-card p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
    font-weight: 500;
}

/* Animations Keyframes */
@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.2); }
    50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
}

@keyframes floatGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 40px) scale(1.1); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Responsive Rules */
@media (max-width: 640px) {
    body {
        padding: 20px 12px;
    }

    .main-header h1 {
        font-size: 1.65rem;
    }

    .category-header {
        padding: 16px 18px;
    }

    .cat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
    }

    .category-title h2 {
        font-size: 1rem;
    }

    .category-body {
        padding: 0 16px 20px 16px;
    }

    .items-grid {
        grid-template-columns: 1fr;
    }
}