:root {
    --primary-color: #1565c0; 
    --secondary-color: #ff9800;
    --background-color: #ffffff;
    --text-color: #333333;
    --nav-text: #ffffff;
    --nav-bg: #1565c0 ; 
    --nav-bg-gradient: linear-gradient(315deg, #1e88e5 0%, #1565c0 100%);
    --card-gradient: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
    --sidebar-width: 200px;
}

[data-theme="dark"] {
    --primary-color: #0d47a1;
    --secondary-color: #ffa726;
    --background-color: #121212;
    --text-color: #ffffff;
   
    --nav-text: #00bfff; /*#1e88e5*/
    --nav-bg: #1e1e1e;
    --nav-bg-gradient: #1e1e1e ; 
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Arial', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

.navbar {
    background: var(--nav-bg-gradient);
    color: var(--nav-text);
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: 70px;
}

.stock-ticker {
    background-color: var(--nav-bg);
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 1rem;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    z-index: 999;
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    gap: 3rem;
    height: 50px;
}

.stock-item {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.stock-price {
    color: var(--primary-color);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.stock-change.positive {
    color: #4caf50;
    font-weight: 500;
}

.stock-change.negative {
    color: #f44336;
    font-weight: 500;
}

.brand {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--nav-text);
    letter-spacing: -0.5px;
}

.nav-links {
    position: fixed;
    left: 0;
    top: 120px;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--nav-bg-gradient);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    list-style: none;
}

.nav-links li {
    margin-bottom: 0.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--nav-text);
    font-weight: 500;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    display: block;
    letter-spacing: 0.3px;
}

.nav-links a:hover {
    color: var(--secondary-color);
    background-color: rgba(0, 0, 0, 0.05);
    transform: translateX(5px);
}

.theme-toggle {
    cursor: pointer;
    padding: 0.75rem;
    font-size: 1.4rem;
    color: var(--nav-text);
    transition: transform 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger span {
    display: block;
    width: 28px;
    height: 3px;
    background-color: var(--nav-text);
    transition: 0.3s;
    border-radius: 2px;
}

main {
    margin-top: 120px;
    margin-left: var(--sidebar-width);
    padding: 2.5rem;
}

h1 {
    color: var(--text-color);
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 120px;
        left: 0;
        right: 0;
        bottom: auto;
        width: 100%;
        background-color: var(--nav-bg);
        flex-direction: column;
        padding: 1.5rem;
        gap: 0.5rem;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    main {
        margin-left: 0;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        margin-bottom: 0;
    }

    .nav-links a {
        display: block;
        padding: 1rem;
        font-size: 1.1rem;
    }

    .nav-links a:hover {
        transform: none;
    }

    .ad-banner {
        display: none;
    }

    .mobile-ad-banner {
        display: block;
    }

    .nav-icon {
        margin-top: 1rem;
        padding: 0.5rem;
        width: 100%;
        margin: 0 auto;
    }

    .nav-icon img {
        width: 60%;
        max-width: 200px;
        margin: 0 auto;
    }
}

@media (min-width: 769px) {
    .mobile-ad-banner {
        display: none;
    }
    
    .nav-links .ad-banner {
        display: block;
        margin-top: auto;
        margin-bottom: 2rem;
    }
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.no-ticker .stock-ticker {
    display: none !important;
}
body.no-ticker .nav-links {
    top: 70px !important;
}
body.no-ticker main {
    margin-top: 70px !important;
}

.ad-banner {
    display: none;
}

@media (min-width: 1100px) {
    .ad-banner {
        display: flex;
        position: fixed;
        top: 120px;
        right: 32px;
        width: 300px;
        height: 600px;
        
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        border-radius: 8px;
        align-items: flex-start;
        justify-content: center;
        z-index: 900;
        padding: 1rem 0.5rem;
    }
    main {
        margin-right: 340px;
    }
}

.mobile-ad-banner {
    display: none;
    width: 300px;
    margin: 2rem auto;
    /* background: var(--nav-bg); */
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 8px;
    padding: 1rem 0.5rem;
}

@media (max-width: 1099px) {
    .ad-banner {
        display: none !important;
    }
    .mobile-ad-banner {
        display: block;
    }
}

body.no-ad .ad-banner,
body.no-ad .mobile-ad-banner {
    display: none !important;
}

.ad-content {
    width: 100%;
    text-align: center;
}

.ad-content span {
    display: block;
    font-size: 1rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
} 

.portfolio-table {
    width: 100%;
    background: #f6f8fa;
    border-radius: 10px;
    border-collapse: separate;
    border-spacing: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-top: 2rem;
    overflow: hidden;
}
.portfolio-table th, .portfolio-table td {
    text-align: left;
    padding: 1rem 1.2rem;
    vertical-align: top;
}
.portfolio-table th {
    background: var(--primary-color);
    background: #ff9800;
    color: #ffffff;
    font-weight: 600;
}
.portfolio-table tr:not(:first-child) td {
    background: #f6f8fa;
}
[data-theme="dark"] .portfolio-table {
    background: #23272f;
}
[data-theme="dark"] .portfolio-table tr:not(:first-child) td {
    background: #23272f;
}

#flame-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0 auto;
    padding: 1rem;
}

#flame-container svg {
    display: block;
    margin: 0 auto;
}
