:root {
    /* Memphis Pink Theme */
    --bg-base: #ffffff;
    --card-bg: #fff0f5; /* Faded Pink Background */
    --card-border: #f0f0f0;
    
    /* Text Colors */
    --text-primary: #333333;
    --text-secondary: #777777;
    
    /* Memphis Accents */
    --accent-pink: #ff8fa3;   /* Vibrant soft pink */
    --accent-peach: #ffc09f;  /* Soft peach/orange */
    --accent-line: #333333;   /* Dark grey for lines */
    
    /* Functional Colors */
    --accent-green: #588157; /* Muted natural green */
    --accent-red: #d9534f;   /* Muted red */
    --accent-grey: #f9f9f9;
    
    --border-radius: 24px; /* More rounded for Memphis style */
    
    /* Minimalist Shadows */
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --card-hover-shadow: 0 10px 25px rgba(255, 143, 163, 0.15); /* Pink tinted shadow */
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #e0f7fa 0%, #b3e5fc 100%); /* Cute Sky Blue */
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Header */
.dashboard-header {
    padding: 60px 20px 40px;
    text-align: center;
    position: relative;
    z-index: 10;
}

.dashboard-header .header-date-time {
    color: var(--text-primary);
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-style: italic;
    font-size: 1.4rem;
    margin: 0 0 32px 0;
    letter-spacing: 0.02em;
    position: relative;
    display: inline-block;
}

/* Decorative underline for date */
.dashboard-header .header-date-time::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 4px;
    background-color: var(--accent-pink);
    border-radius: 2px;
}

/* Add Stock Section */
.add-stock-section {
    display: flex;
    justify-content: center;
    gap: 16px;
    position: relative;
}

/* Decorative dots near input */
.add-stock-section::before {
    content: '';
    position: absolute;
    left: -40px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background-image: radial-gradient(circle, var(--accent-pink) 25%, transparent 25%);
    background-size: 10px 10px;
    opacity: 0.5;
}

#new-stock-input {
    background: #ffffff;
    border: 2px solid var(--accent-peach); /* Peach border */
    border-radius: 50px;
    padding: 14px 28px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    outline: none;
    width: 240px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    box-shadow: 0 4px 0 rgba(255, 192, 159, 0.3); /* Offset shadow style */
}

#new-stock-input:focus {
    border-color: var(--accent-pink);
    box-shadow: 0 4px 0 rgba(255, 143, 163, 0.3);
}

#add-stock-btn {
    background: var(--accent-pink);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(255, 143, 163, 0.4);
}

#add-stock-btn:hover {
    transform: translateY(-2px);
    background: #ff7a91;
    box-shadow: 0 6px 15px rgba(255, 143, 163, 0.5);
}

#add-stock-btn:active {
    transform: translateY(0);
}

/* Grid Layout */
.dashboard-container {
    padding: 0 40px 80px;
    max-width: 1600px;
    margin: 0 auto;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

@media (min-width: 1400px) {
    .bento-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 1100px) {
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .dashboard-container { padding: 20px; }
    .bento-grid { grid-template-columns: 1fr; }
}

/* Card Design - Memphis Style */
.stock-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 560px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

/* Decorative element inside card */
/* Removed as per user request to clean up */
/* .stock-card::before { ... } */

.stock-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-hover-shadow);
    border-color: var(--accent-pink);
}

/* Delete Button */
.delete-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid #eeeeee;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 5;
    font-size: 0.9rem;
}

.stock-card:hover .delete-btn {
    border-color: var(--accent-pink);
    color: var(--accent-pink);
    background: #fff0f3;
}

.delete-btn:hover {
    background: var(--accent-pink) !important;
    color: white !important;
}

/* Card Header */
.card-header {
    display: flex;
    flex-direction: column; /* Stack vertically */
    align-items: center;    /* Center everything */
    justify-content: center;
    position: relative;
    z-index: 1;
    text-align: center;     /* Ensure text centering */
    margin-top: 10px;       /* Spacing from top */
}

.company-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 8px;
}

.symbol {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;       /* Larger symbol */
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 4px;
    position: relative;
    display: inline-block;
}

/* Pink highlight on symbol */
.symbol::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 100%;
    height: 10px;
    background-color: var(--accent-pink);
    opacity: 0.2;
    z-index: -1;
    border-radius: 6px;
}

.price-info {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.current-price {
    font-family: 'Playfair Display', serif; /* Artistic font */
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.price-change {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 4px;
    padding: 6px 12px;
    border-radius: 20px; /* Pill shape */
    display: inline-block;
}

.price-change.up { 
    background-color: rgba(88, 129, 87, 0.1);
    color: var(--accent-green); 
}
.price-change.down { 
    background-color: rgba(217, 83, 79, 0.1);
    color: var(--accent-red); 
}

/* Chart Container */
.chart-container {
    height: 180px;
    width: 100%;
    margin: 10px 0;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--card-border);
}

/* Fundamentals Grid */
.fundamentals-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 20px 0;
    border-top: 2px dashed #f0f0f0;
    border-bottom: 2px dashed #f0f0f0;
}

.stat-box {
    text-align: center;
}

.stat-label {
    font-family: 'Playfair Display', serif; /* Artistic font */
    font-size: 0.8rem;
    font-style: italic; /* Italic style */
    color: var(--text-secondary); /* Darker pink/peach can be used if desired, keeping secondary for now or change to accent */
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
    font-weight: 600;
}

.stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Playfair Display', serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Analyst Section */
.analyst-section {
    margin-top: auto;
}

.analyst-header {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-family: 'Playfair Display', serif; /* Artistic font */
    font-weight: 700;
    letter-spacing: 0.02em;
}

.analyst-bar {
    height: 8px;
    width: 100%;
    background: var(--accent-grey);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
}

.bar-segment { height: 100%; }
.bar-buy { background-color: var(--accent-green); }
.bar-hold { background-color: #ffcc00; }
.bar-sell { background-color: var(--accent-red); }

/* News Section */
.news-section {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.news-item {
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.3s ease;
    padding: 10px 14px;
    border-radius: 12px;
    border-left: 4px solid var(--accent-peach); /* Peach accent */
    background-color: #f0f8ff; /* Faded Light Blue */
}

.news-item:hover {
    background-color: #fff0f3; /* Light pink tint */
    color: var(--text-primary);
    border-left-color: var(--accent-pink); /* Pink accent on hover */
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #fafafa 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 6px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Error Message */
.error-message {
    color: var(--accent-red);
    text-align: center;
    padding: 20px;
    font-weight: 500;
}
