 @keyframes spinner-border {
     to {
         transform: rotate(360deg);
     }
 }

 @keyframes slideIn {
     from {
         transform: translateX(100%);
         opacity: 0;
     }

     to {
         transform: translateX(0);
         opacity: 1;
     }
 }

 .spinner-border {
     display: inline-block;
     width: 1rem;
     height: 1rem;
     vertical-align: text-bottom;
     border: 0.2em solid currentColor;
     border-right-color: transparent;
     border-radius: 50%;
     animation: spinner-border .75s linear infinite;
 }

.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 0;
    margin-bottom: 30px;
}

 .performance-overview {
     background: white;
     padding: 20px;
     border-radius: 10px;
     box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
     margin: 20px;
 }

 .summary-cards {
     display: flex;
     gap: 15px;
     margin-bottom: 20px;
     flex-wrap: wrap;
 }

 .metric-card {
     background: #f8f9fa;
     padding: 20px;
     border-radius: 8px;
     text-align: center;
     border-left: 4px solid #007bff;
     flex: 1;
     min-width: 200px;
 }

 .metric-card.positive {
     border-left-color: #28a745;
 }

 .metric-card.negative {
     border-left-color: #dc3545;
 }

 .metric-value {
     font-size: 24px;
     font-weight: bold;
     margin: 10px 0;
 }

 .analysis-card {
     background: white;
     border-radius: 10px;
     box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
     margin: 20px;
     overflow: hidden;
 }

 .card-header {
     padding: 15px 20px;
     background: #f8f9fa;
     display: flex;
     justify-content: space-between;
     align-items: center;
     cursor: pointer;
 }

 .year-performance {
     display: flex;
     gap: 15px;
 }

 .return-badge {
     padding: 5px 10px;
     border-radius: 15px;
     font-size: 12px;
     font-weight: bold;
 }

 .return-badge.strategy {
     background: #e3f2fd;
 }

 .return-badge.sp500 {
     background: #f3e5f5;
 }

 .return-badge.outperformance.positive {
     background: #e8f5e8;
 }

 .return-badge.outperformance.negative {
     background: #ffebee;
 }

 .card-content {
     padding: 20px;
 }

 .portfolio-charts {
     display: flex;
     gap: 40px;
     justify-content: center;
     padding: 20px;
     flex-wrap: wrap;
 }

 .chart-wrapper {
     text-align: center;
 }

 .construction-flow {
     padding: 20px;
     margin: 20px 0;
     background: #f8f9fa;
     border-radius: 8px;
 }

 .flow-steps {
     display: flex;
     align-items: center;
     justify-content: center;
     gap: 10px;
     flex-wrap: wrap;
 }

 .flow-step {
     text-align: center;
     padding: 15px;
     background: white;
     border-radius: 8px;
     min-width: 100px;
     border: 1px solid #ddd;
 }

 .step-count {
     display: block;
     font-size: 20px;
     font-weight: bold;
     color: #007bff;
 }

 .step-tickers {
     font-size: 12px;
     margin-top: 5px;
     color: #666;
 }

 .stock-table {
     width: 100%;
     border-collapse: collapse;
     margin-top: 10px;
 }

 .stock-table th,
 .stock-table td {
     padding: 8px 12px;
     text-align: left;
     border-bottom: 1px solid #ddd;
 }

 .stock-table th {
     background: #f8f9fa;
     font-weight: 600;
 }

 .debug-section {
     margin-top: 20px;
     padding: 15px;
     background: #fff3cd;
     border-radius: 5px;
 }


 .param-form {
     margin: 20px;
     padding: 20px;
     border: 1px solid #ddd;
     border-radius: 10px;
     background: #f9f9f9;
 }

 .param-group {
     margin-bottom: 15px;
 }

 label {
     display: inline-block;
     width: 200px;
     font-weight: bold;
 }

 .toggle-button {
     margin-bottom: 5px;
     padding: 4px 10px;
     cursor: pointer;
 }

 input,
 select {
     padding: 5px;
     border: 1px solid #ccc;
     border-radius: 4px;
 }

 .colorR {
     width: 300px;
     padding: 10px 5px;
     margin: 5px;
     border-radius: 5px;
     text-align: center;
 }

 .return {
     background-color: antiquewhite;
 }

 .st {
     background-color: burlywood;
 }

 .sp {
     background-color: paleturquoise;
 }

 .good {
     padding: 2px;
     background-color: lightgreen;
     color: black;
 }

 .bad {
     padding: 2px;
     background-color: lightcoral;
     color: black;
 }

 .tooltip {
     position: relative;
     display: inline-block;
     cursor: pointer;
 }

 .tooltip .tooltiptext {
     visibility: hidden;
     width: 300px;
     background-color: #333;
     color: #fff;
     text-align: left;
     border-radius: 6px;
     padding: 10px;
     position: absolute;
     z-index: 1;
     bottom: 125%;
     left: 50%;
     margin-left: -150px;
     opacity: 0;
     transition: opacity 0.3s;
     font-size: 14px;
     box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
 }

 .tooltip:hover .tooltiptext {
     visibility: visible;
     opacity: 1;
 }

 .ticker-item {
     display: inline-block;
     margin: 2px 5px;
     padding: 3px 8px;
     background: #f0f0f0;
     border-radius: 4px;
     cursor: pointer;
     transition: background-color 0.2s;
     opacity: 1;
 }

 .ticker-item:hover {
     background: #e0e0e0;
 }

 .analysis-card {
     border: 1px solid #ddd;
     border-radius: 10px;
     margin: 10px 0;
     overflow: hidden;
 }

 .card-header {
     background: #f5f5f5;
     padding: 15px;
     cursor: pointer;
     display: flex;
     justify-content: space-between;
     align-items: center;
 }

 .card-header:hover {
     background: #e9e9e9;
 }

 .year-performance {
     display: flex;
     gap: 10px;
 }

 .return-badge {
     padding: 5px 10px;
     border-radius: 15px;
     font-weight: bold;
 }

 .positive {
     background: #d4edda;
     color: #155724;
 }

 .negative {
     background: #f8d7da;
     color: #721c24;
 }

 .sp500 {
     background: #d1ecf1;
     color: #0c5460;
 }

 .next-year-section {
     background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
     color: white;
     padding: 20px;
     border-radius: 10px;
     margin: 20px 0;
 }

 .next-year-tickers {
     display: flex;
     flex-wrap: wrap;
     gap: 10px;
     margin-top: 15px;
 }

 .next-year-ticker {
     background: rgba(255, 255, 255, 0.2);
     padding: 8px 15px;
     border-radius: 20px;
     font-weight: bold;
 }