* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary:#000000;
    --bg-secondary: #0a0a0a;
    --bg-card: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --accent-green: #00ff88;
    --accent-red: #ff3b54;
    --accent-cyan: #058d91;
    --accent-yellow: #ffb800;
    --border-color: #2a2a2a;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    padding-bottom: 70px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Top Bar */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(60px + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
    background: #000000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: max(20px, calc(env(safe-area-inset-left) + 20px));
    padding-right: max(20px, calc(env(safe-area-inset-right) + 20px));
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 28px;
    background: linear-gradient(135deg, #ffb800 0%, #ff9500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 8px rgba(255, 184, 0, 0.3));
}

.logo-section h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

.settings-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

.settings-btn:hover {
    color: var(--text-primary);
    transform: rotate(90deg);
}

.settings-btn.active {
    color: var(--accent-cyan);
}

/* Market Status Strip */
.market-status {
    position: fixed;
    top: calc(60px + env(safe-area-inset-top));
    left: 0;
    right: 0;
    height: 50px;
    background: #000000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: max(20px, calc(env(safe-area-inset-left) + 20px));
    padding-right: max(20px, calc(env(safe-area-inset-right) + 20px));
    z-index: 999;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.status-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: rgba(255, 59, 84, 0.2);
    border-radius: 5px;
    font-weight: 600;
    font-size: 11px;
}

.status-badge.open {
    background: rgba(0, 255, 136, 0.2);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-red);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-badge.open .status-dot {
    background: var(--accent-green);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.index-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.index-name {
    font-weight: 600;
    color: var(--text-primary);
}

.index-value {
    font-weight: 700;
    font-size: 14px;
}

.index-change, .index-percent {
    font-size: 12px;
    font-weight: 600;
}

.index-change.positive, .index-percent.positive {
    color: var(--accent-green);
}

.index-change.negative, .index-percent.negative {
    color: var(--accent-red);
}

.status-right {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-secondary);
    font-size: 11px;
}

/* Main Content */
.main-content {
    margin-top: calc(110px + env(safe-area-inset-top));
    padding-bottom: calc(90px + env(safe-area-inset-bottom));
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    padding: 20px max(20px, calc(env(safe-area-inset-left) + 20px)) 15px max(20px, calc(env(safe-area-inset-right) + 20px));
    opacity: 0.85;
}

/* Featured Slider */
.featured-slider {
    position: relative;
    margin-bottom: 20px;
}

.slider-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 20px;
    gap: 15px;
}

.slider-container::-webkit-scrollbar {
    display: none;
}

.featured-card {
    flex: 0 0 100%;
    max-width: calc(100% - 40px);
    height: 280px;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    scroll-snap-align: start;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 
        -3px -3px 8px rgba(255, 255, 255, 0.12),
        4px 4px 12px rgba(0, 0, 0, 0.80);
}

.featured-card:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 
        -4px -4px 10px rgba(255, 255, 255, 0.15),
        5px 5px 14px rgba(0, 0, 0, 0.85);
}

.featured-card:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 
        3px 3px 6px rgba(0, 0, 0, 0.80),
        -4px -4px 8px rgba(255, 255, 255, 0.12),
        inset 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.featured-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.98) 0%, rgba(0,0,0,0.85) 60%, rgba(0,0,0,0.4) 85%, transparent 100%);
}

.featured-card h3 {
    font-size: 18px;
    line-height: 1.4;
    margin-bottom: 10px;
    font-weight: 600;
}

.news-source {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.95);
    color: #000000;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-secondary);
    opacity: 0.3;
    transition: all 0.3s ease;
    cursor: pointer;
}

.slider-dot.active {
    opacity: 1;
    background: var(--accent-cyan);
    width: 24px;
    border-radius: 4px;
}

/* Index Summary Bar - White Card */
.index-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 22px;
    margin: 20px max(16px, calc(env(safe-area-inset-left) + 16px)) 0 max(16px, calc(env(safe-area-inset-right) + 16px));
    background: #ffffff;
    border-radius: 16px;
    border: none;
    box-shadow: 
        -3px -3px 8px rgba(255, 255, 255, 0.9),
        4px 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.index-summary:hover {
    transform: translateY(-1px);
    box-shadow: 
        -4px -4px 10px rgba(255, 255, 255, 0.95),
        5px 5px 16px rgba(0, 0, 0, 0.2);
}

.index-summary-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.index-name-big {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: 0.2px;
}

.summary-value {
    font-size: 20px;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -0.3px;
}

.index-summary-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.index-summary-right i {
    font-size: 22px;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
}

.summary-change {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.summary-change.positive {
    color: var(--accent-green);
}

.summary-change.negative {
    color: var(--accent-red);
}

.index-summary-right i.fa-caret-up {
    color: var(--accent-green);
}

.index-summary-right i.fa-caret-down {
    color: var(--accent-red);
}

/* News Tabs */
.news-tabs {
    display: flex;
    overflow-x: auto;
    gap: 10px; /* Same as category tabs */
    margin-bottom: 20px;
    padding-top: 20px; /* Added top padding */
    padding-bottom: 8px;
    padding-left: max(20px, calc(env(safe-area-inset-left) + 20px));
    padding-right: max(20px, calc(env(safe-area-inset-right) + 20px));
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    justify-content: flex-start; /* Start aligned, can scroll */
}

.news-tabs::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px; /* Similar to category tabs */
    background: transparent; /* Transparent like category tabs */
    border: none; /* No border */
    border-radius: 20px; /* Same rounded pill shape */
    color: rgba(255, 255, 255, 0.6); /* Lighter default text color */
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    -webkit-tap-highlight-color: transparent;
    height: auto; /* Auto height for icon + text */
    min-height: 70px; /* Minimum height */
    min-width: 80px; /* Minimum width */
    flex: 0 0 auto; /* Don't grow, maintain size */
    font-size: 10px;
    font-weight: 600; /* Same as category tabs */
    text-transform: uppercase;
    letter-spacing: 0.6px;
    box-shadow: none; /* No shadow */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.tab-btn i {
    font-size: 18px; /* Slightly smaller icon */
    opacity: 0.9;
    color: inherit; /* Inherit color from parent */
}

.tab-btn span {
    font-size: 10px;
    font-weight: 600;
}

.tab-btn.active {
    background: transparent; /* Transparent like category tabs */
    border: none; /* No border */
    color: var(--accent-cyan); /* Cyan text like category tabs */
    font-weight: 700; /* Bold when active */
    box-shadow: none; /* No shadow */
    transform: none; /* No transform */
}

.tab-btn.active i {
    opacity: 1;
    color: var(--accent-cyan); /* Cyan icon when active */
}

.tab-btn:hover:not(.active) {
    border: none; /* No border */
    color: rgba(255, 255, 255, 0.9); /* Lighter text on hover */
    transform: none; /* No transform */
    box-shadow: none; /* No shadow */
    background: transparent; /* Keep transparent */
}

.tab-btn:hover:not(.active) i {
    opacity: 1;
}

.tab-btn:active {
    transform: translateY(0) scale(0.98); /* Same active effect as category tabs */
    box-shadow: none; /* No shadow */
    background: transparent; /* Keep transparent */
}

/* News List */
.news-list {
    padding: 0; /* Remove side padding */
    display: flex;
    flex-direction: column;
    gap: 0; /* No gap between cards */
}

.news-card {
    display: flex;
    gap: 15px;
    background: #000000; /* Pure black */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 2px solid rgb(255, 255, 255);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    border-left: none;
    border-right: none;
    border-radius: 0; /* Remove rounded corners */
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
    padding-left: max(20px, calc(env(safe-area-inset-left) + 20px));
    padding-right: max(20px, calc(env(safe-area-inset-right) + 20px));
    box-shadow: 
        0 2px 12px rgba(0, 0, 0, 0.4),
        0 1px 3px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: cardFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    animation-fill-mode: forwards;
    min-height: 140px;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
}

.news-card:nth-child(1) { animation-delay: 0.05s; }
.news-card:nth-child(2) { animation-delay: 0.1s; }
.news-card:nth-child(3) { animation-delay: 0.15s; }
.news-card:nth-child(4) { animation-delay: 0.2s; }
.news-card:nth-child(5) { animation-delay: 0.25s; }
.news-card:nth-child(n+6) { animation-delay: 0.3s; }

/* Divider line between cards */
.news-card:not(:first-child)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.15) 20%,
        rgba(255, 255, 255, 0.15) 80%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* Bottom Gradient Fade - Matching stock cards */
.news-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(
        0deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 1;
}

.news-card:hover {
    transform: translateY(-2px);
    border-top-color: rgba(255, 255, 255, 0.18);
    border-bottom-color: rgba(255, 255, 255, 0.18);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.5),
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.news-card:active {
    transform: translateY(0) scale(0.99);
    box-shadow: 
        0 1px 6px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Ensure content is above gradients */
.news-card > * {
    position: relative;
    z-index: 2;
}

.news-thumbnail {
    flex: 0 0 130px;
    height: 130px;
    position: relative;
    overflow: hidden;
    border-radius: 10px; /* Slightly rounded */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.news-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-thumbnail img {
    transform: scale(1.05);
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.news-content {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0; /* Prevent overflow */
}

.news-content h3 {
    font-size: 16px; /* Slightly larger */
    line-height: 1.4;
    font-weight: 700;
    color: #ffffff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: -0.1px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

.news-content p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6); /* Lighter gray */
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 500;
}

.news-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.news-meta span {
    color: rgba(255, 255, 255, 0.4);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.news-source-small {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    font-weight: 600;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.news-source-small:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.news-source-small i {
    font-size: 10px;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.7);
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 50px 20px;
    color: var(--text-secondary);
}

.loading-spinner i {
    font-size: 40px;
    color: var(--accent-cyan);
    filter: drop-shadow(0 2px 4px rgba(0, 217, 255, 0.3));
}

/* Fade-in animation */
@keyframes cardFadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
        box-shadow: 
            -2px -2px 4px rgba(255, 255, 255, 0.5),
            3px 3px 8px rgba(0, 0, 0, 0.1);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        box-shadow: 
            -3px -3px 8px rgba(255, 255, 255, 0.9),
            4px 4px 12px rgba(0, 0, 0, 0.15);
    }
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(70px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: #000000;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid var(--border-color);
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 15px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 12px;
    font-weight: 600;
}

.nav-item i {
    font-size: 22px;
}

.nav-item.active {
    color: var(--accent-cyan);
}

.nav-item:hover {
    color: var(--accent-cyan);
}

/* Responsive Design */
@media (min-width: 768px) {
    .featured-card {
        max-width: 500px;
    }
    
    .main-content {
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    .news-tabs {
        gap: 8px;
        padding-top: 16px; /* Responsive top padding */
        padding-left: max(16px, calc(env(safe-area-inset-left) + 16px));
        padding-right: max(16px, calc(env(safe-area-inset-right) + 20px));
    }

    .tab-btn {
        padding: 10px 14px;
        min-height: 65px;
        min-width: 75px;
        font-size: 9px;
    }

    .tab-btn i {
        font-size: 16px;
    }

    .news-card {
        padding: 16px;
        padding-left: max(16px, calc(env(safe-area-inset-left) + 16px));
        padding-right: max(16px, calc(env(safe-area-inset-right) + 16px));
        min-height: 130px;
        gap: 12px;
    }

    .news-thumbnail {
        flex: 0 0 110px;
        height: 110px;
    }

    .news-content h3 {
        font-size: 15px;
    }
}

/* Mobile Touch Optimizations */
@media (hover: none) and (pointer: coarse) {
    .news-card:hover,
    .featured-card:hover,
    .tab-btn:hover:not(.active) {
        transform: translateY(0);
    }
    
    .news-card:active,
    .featured-card:active,
    .tab-btn:active {
        transform: translateY(1px) scale(0.98);
    }
}

@media (max-width: 480px) {
    .index-info {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .status-right {
        display: none;
    }
    
    .index-summary {
        margin: 16px max(12px, calc(env(safe-area-inset-left) + 12px)) 0 max(12px, calc(env(safe-area-inset-right) + 12px));
        padding: 18px 20px;
        border-radius: 14px;
    }
    
    .news-card {
        padding: 14px;
        padding-left: max(14px, calc(env(safe-area-inset-left) + 14px));
        padding-right: max(14px, calc(env(safe-area-inset-right) + 14px));
        min-height: 120px;
        gap: 10px;
    }

    .news-thumbnail {
        flex: 0 0 100px;
        height: 100px;
    }

    .news-content h3 {
        font-size: 14px;
    }

    .news-content p {
        font-size: 12px;
    }
    
    .news-tabs {
        gap: 6px;
        padding-top: 12px; /* Responsive top padding */
        padding-left: max(12px, calc(env(safe-area-inset-left) + 12px));
        padding-right: max(12px, calc(env(safe-area-inset-right) + 12px));
    }

    .tab-btn {
        padding: 9px 12px;
        min-height: 60px;
        min-width: 70px;
        font-size: 8px;
        letter-spacing: 0.5px;
    }

    .tab-btn i {
        font-size: 14px;
    }

    .tab-btn span {
        font-size: 8px;
    }
}

/* Modal styles */
.confirm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

.confirm-modal.active {
    display: flex;
}

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

.confirm-modal-content {
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    width: 100%;
    max-width: 340px;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.6),
        0 2px 8px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.confirm-modal-header {
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.confirm-modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.3px;
    margin: 0;
}

.confirm-modal-body {
    padding: 20px 24px;
}

.confirm-modal-body p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    margin: 0;
    font-weight: 500;
    white-space: pre-line;
}

.confirm-modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 24px 24px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.confirm-btn-yes {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
    min-height: 48px;
    background: var(--accent-cyan);
    color: #000000;
    box-shadow: 
        0 4px 12px rgba(0, 217, 255, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.2);
}

.confirm-btn-yes:hover {
    background: var(--accent-yellow);
    transform: translateY(-1px);
    box-shadow: 
        0 6px 16px rgba(255, 184, 0, 0.4),
        0 4px 6px rgba(0, 0, 0, 0.3);
}

.confirm-btn-yes:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 8px rgba(0, 217, 255, 0.3),
        0 1px 2px rgba(0, 0, 0, 0.2);
}

@media (max-width: 480px) {
    .confirm-modal-content {
        max-width: calc(100% - 32px);
        border-radius: 16px;
    }
    
    .confirm-modal-header {
        padding: 20px 20px 14px 20px;
    }
    
    .confirm-modal-header h3 {
        font-size: 18px;
    }
    
    .confirm-modal-body {
        padding: 16px 20px;
    }
    
    .confirm-modal-body p {
        font-size: 14px;
    }
    
    .confirm-modal-footer {
        padding: 14px 20px 20px 20px;
        gap: 10px;
    }
    
    .confirm-btn-yes {
        padding: 12px 16px;
        font-size: 14px;
        min-height: 44px;
    }
}

/* ============================================
   Canva-Style Ascend Animation for Value Updates
   ============================================ */

/* Basic Ascend Animation (slides up from below) */
@keyframes ascend {
    0% {
        transform: translateY(20px) scale(0.95);
        opacity: 0;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Ascend with Green Glow (for profit/positive) */
@keyframes ascendPositive {
    0% {
        transform: translateY(20px) scale(0.95);
        opacity: 0;
    }
    40% {
        text-shadow: 0 0 12px rgba(0, 255, 136, 0.7);
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
        text-shadow: 0 0 0 rgba(0, 255, 136, 0);
    }
}

/* Ascend with Red Glow (for loss/negative) */
@keyframes ascendNegative {
    0% {
        transform: translateY(20px) scale(0.95);
        opacity: 0;
    }
    40% {
        text-shadow: 0 0 12px rgba(255, 59, 84, 0.7);
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
        text-shadow: 0 0 0 rgba(255, 59, 84, 0);
    }
}

/* Animation Classes */
.value-ascend {
    animation: ascend 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.value-ascend-positive {
    animation: ascendPositive 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.value-ascend-negative {
    animation: ascendNegative 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Color Overlay for Cards (Profit/Loss) */
.profit-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.15) 0%, rgba(0, 255, 136, 0.05) 100%);
    border-radius: inherit;
    pointer-events: none;
    z-index: 1;
    animation: overlayFadeInOut 1.2s ease-out forwards;
    opacity: 0;
}

.loss-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 59, 84, 0.15) 0%, rgba(255, 59, 84, 0.05) 100%);
    border-radius: inherit;
    pointer-events: none;
    z-index: 1;
    animation: overlayFadeInOut 1.2s ease-out forwards;
    opacity: 0;
}

@keyframes overlayFadeInOut {
    0% {
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* Ensure cards have position relative for overlay */
.portfolio-summary,
.holding-card,
.stock-card {
    position: relative;
    overflow: hidden;
}

/* Make sure card content is above overlay */
.portfolio-summary > *,
.holding-card > *,
.stock-card > * {
    position: relative;
    z-index: 2;
}

