/* Pills for selected funds */
.selected-funds {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    min-height: 36px;
    justify-content: flex-start;
}

.fund-pill {
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, #4e79a7 60%, #76b7b2 100%);
    color: #fff;
    border-radius: 16px;
    padding: 6px 16px 6px 12px;
    font-size: 1rem;
    font-weight: 500;
    box-shadow: 0 1px 4px rgba(76, 121, 167, 0.08);
    position: relative;
    transition: background 0.2s;
}

.fund-pill .remove-pill {
    margin-left: 8px;
    cursor: pointer;
    font-size: 1.1em;
    color: #fff;
    background: none;
    border: none;
    outline: none;
    padding: 0 4px;
    border-radius: 50%;
    transition: background 0.2s;
}

.fund-pill .remove-pill:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #222;
}

body {
    font-family: Arial, sans-serif;
    margin: 20px;
}

/* Logo container with grey background */
.logo-container {
    background: transparent;
    padding-top: 20px;
    padding-left: 20px;
    margin-bottom: 10px;
}

/* Input and buttons */
#stockInput {
    padding: 8px;
    font-size: 1rem;
    width: 250px;
    margin-right: 10px;
    width: 100%;
    min-width: 250px;
    max-width: 350px;
    padding: 10px;
    font-size: 1.05rem;
    border-radius: 8px;
    border: 1px solid #bbb;
    background: #f7f7f7;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
    color: #333;
    margin-bottom: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#stockInput:focus {
    border-color: #4e79a7;
    box-shadow: 0 2px 8px rgba(76, 121, 167, 0.12);
}

#stockInput option {
    padding: 8px 12px;
    font-size: 1rem;
    background: #fff;
    color: #333;
    border-bottom: 1px solid #eee;
}

#stockInput option:checked {
    background: linear-gradient(90deg, #4e79a7 60%, #76b7b2 100%);
    color: #fff;
}

#startButton,
#runButton {
    padding: 10px 28px;
    font-size: 1.05rem;
    border-radius: 8px;
    border: none;
    background: linear-gradient(90deg, #4e79a7 60%, #76b7b2 100%);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(76, 121, 167, 0.08);
    transition: background 0.2s, transform 0.2s;
}

#startButton:hover,
#runButton:hover {
    background: linear-gradient(90deg, #76b7b2 60%, #4e79a7 100%);
    transform: translateY(-2px) scale(1.03);
}

#status {
    font-size: 1rem;
    color: #4e79a7;
    margin-top: 8px;
    text-align: center;
    font-family: 'Consolas', monospace;
}

/* Analysis section container */
.analysis-section {
    max-width: 850px;
    margin: 0 auto 32px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Themed metrics panels */
.metrics {
    background: linear-gradient(90deg, #f9f9f9 60%, #eaf6f6 100%);
    border: 1px solid #76b7b2;
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 1.5em;
    white-space: pre-wrap;
    font-family: Consolas, monospace;
    box-shadow: 0 2px 12px rgba(76, 121, 167, 0.08);
    font-size: 1.08rem;
    color: #2c3e50;
    text-align: center;
    max-width: 75%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* Themed charts */
canvas {
    max-width: 800px;
    width: 100%;
    margin-bottom: 2em;
    border: 1px solid #76b7b2;
    border-radius: 16px;
    background: linear-gradient(90deg, #f7fafd 60%, #eaf6f6 100%);
    box-shadow: 0 2px 12px rgba(76, 121, 167, 0.08);
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Themed tables */
table {
    border-collapse: collapse;
    margin-bottom: 2em;
    background: linear-gradient(90deg, #f9f9f9 60%, #eaf6f6 100%);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(76, 121, 167, 0.08);
    margin-left: auto;
    margin-right: auto;
}

table,
th,
td {
    border: 1px solid #76b7b2;
}

th,
td {
    padding: 10px 16px;
    text-align: center;
    font-size: 1.05rem;
    color: #2c3e50;
}

/* Themed section headers */
h2 {
    background: linear-gradient(90deg, #4e79a7 60%, #76b7b2 100%);
    color: #fff;
    padding: 12px 24px;
    border-radius: 16px;
    margin-top: 32px;
    margin-bottom: 18px;
    font-size: 1.35rem;
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(76, 121, 167, 0.08);
    letter-spacing: 0.02em;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

.ticker-tape {
    width: 100vw;
    overflow: hidden;
    background: #f5f5f5;
    border: 1px solid #ddd;
    margin-bottom: 16px;
    height: 40px;
    display: flex;
    align-items: center;
}

.ticker-items {
    display: flex;
    animation: ticker-scroll 60s linear infinite;
    gap: 32px;
    white-space: nowrap;
}

.ticker-items span {
    font-size: 1rem;
    color: #333;
    padding: 0 8px;
    border-right: 1px solid #ccc;
}

.ticker-items span:last-child {
    border-right: none;
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-60%);
    }
}

.input-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 32px auto 24px auto;
    padding: 24px 32px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    max-width: 400px;
}

.allocation-table {
    width: max-content;
    border-collapse: collapse;
    margin: 1em auto;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 1em;
    background: #fafbfc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.allocation-table th,
.allocation-table td {
    border: 1px solid #e2e5ea;
    padding: 8px 12px;
    text-align: left;
}

.allocation-table th {
    background: #f4f6f8;
    font-weight: 600;
}

.allocation-table tr:nth-child(even) {
    background: #f9fafb;
}