/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-dark: #0a0a0c;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.07);
    --primary: #d4af37; /* Gold */
    --accent-green: #00e676; /* Neon Green */
    --accent-red: #ff1744; /* Neon Red */
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(212, 175, 55, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(0, 230, 118, 0.05) 0%, transparent 20%);
    overflow-x: hidden;
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Layout */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Components: Header */
header {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeInDown 0.8s ease-out;
}

/* Header — helper for non-underlined nav links */
.about-link,
header a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: var(--transition);
}

.about-link:hover,
header a:hover {
    color: var(--text-main);
    text-decoration: none;
}


h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 10px 0;
    background: linear-gradient(to right, #fff, #a1a1aa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

/* Components: List View */
.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.report-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: var(--glass-border);
    border-radius: 16px;
    padding: 30px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.report-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), transparent);
    opacity: 0;
    transition: var(--transition);
}

.report-card:hover {
    transform: translateY(-5px);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-premium);
}

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

.card-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 20px;
}

.card-theme {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(212, 175, 55, 0.1);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

/* Components: Detail View */
.detail-view {
    animation: fadeIn 0.5s ease-out;
}

.nav-bar {
    margin-bottom: 40px;
}

.back-btn {
    background: transparent;
    border: var(--glass-border);
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.back-btn:hover {
    color: var(--text-main);
    border-color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
}

.detail-header {
    text-align: center;
    margin-bottom: 50px;
}

.detail-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.detail-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Top Stock */
.top-stock-section {
    margin-bottom: 50px;
}

.section-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 20px;
    display: block;
}

.top-stock-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 40px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5);
}

.top-stock-highlight {
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    opacity: 0.1;
    filter: blur(40px);
}

.stock-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.stock-name {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.stock-direction {
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.direction-up {
    background: rgba(0, 230, 118, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(0, 230, 118, 0.3);
}

.direction-down {
    background: rgba(255, 23, 68, 0.15);
    color: var(--accent-red);
    border: 1px solid rgba(255, 23, 68, 0.3);
}

.stock-body {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.stock-explanation {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #e4e4e7;
}

.stock-confidence {
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
}

.confidence-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.confidence-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

/* Runners Up */
.runners-up-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.stock-card-small {
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    transition: var(--transition);
}

.stock-card-small:hover {
    background: var(--bg-card-hover);
}

.small-stock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.small-stock-name {
    font-size: 1.25rem;
    font-weight: 600;
}

.small-stock-why {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-muted);
    margin-bottom: 15px;
}

/* Assumptions */
.assumptions-section {
    margin-top: 60px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.assumption-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.assumption-item {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 15px;
    color: var(--text-muted);
}

.assumption-item:last-child {
    border-bottom: none;
}

.assumption-item::before {
    content: '→';
    color: var(--primary);
}

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

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

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

@media (max-width: 768px) {
    .stock-body {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .stock-confidence {
        align-items: flex-start;
        text-align: left;
    }
}
