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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    padding: 20px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

.status-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.status-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.status-item .label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 8px;
}

.status-item .value {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
}

.recommendation-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 1.5em;
}

.status-badge {
    background: rgba(255,255,255,0.3);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9em;
}

.card-body {
    padding: 25px;
}

.recommendation-text {
    font-size: 1.2em;
    margin-bottom: 15px;
    line-height: 1.6;
}

.details {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.details p {
    margin: 0;
    color: #555;
}

.chart-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 25px;
    margin-bottom: 30px;
}

.chart-container h3 {
    margin-bottom: 20px;
    color: #333;
}

#priceChart {
    width: 100%;
    height: 300px;
}

.info-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 25px;
    margin-bottom: 30px;
}

.info-section h3 {
    margin-bottom: 15px;
    color: #333;
}

.info-section ul {
    list-style: none;
    padding: 0;
}

.info-section li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    line-height: 1.6;
}

.info-section li:last-child {
    border-bottom: none;
}

.info-section strong {
    color: #667eea;
}

footer {
    text-align: center;
    color: white;
    padding: 20px;
    opacity: 0.9;
}

footer p {
    margin: 5px 0;
}

.price-positive {
    color: #10b981;
}

.price-negative {
    color: #ef4444;
}

.status-high {
    background: #10b981 !important;
}

.status-normal {
    background: #f59e0b !important;
}

.status-low {
    background: #ef4444 !important;
}

.status-normal-text {
    color: #f59e0b !important;
}

.status-high-text {
    color: #10b981 !important;
}

.status-low-text {
    color: #ef4444 !important;
}

/* Navigation */
.main-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 10px;
}

.nav-link {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.nav-link.active {
    background: white;
    color: #667eea;
}

/* OPEX Calculator Styles */
.calculator-container {
    margin-bottom: 30px;
}

.calculator-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 30px;
}

.calculator-card h2 {
    margin-bottom: 25px;
    color: #333;
    font-size: 1.8em;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 1em;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
}

.input-hint {
    display: block;
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

.calculate-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 10px;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.4);
}

.calculate-btn:active {
    transform: translateY(0);
}

.results-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 30px;
}

.results-card h2 {
    margin-bottom: 25px;
    color: #333;
    font-size: 1.8em;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.result-item {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.result-item.highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.result-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 8px;
}

.result-item.highlight .result-label {
    color: rgba(255, 255, 255, 0.9);
}

.result-value {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
}

.result-item.highlight .result-value {
    color: white;
}

.breakdown-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.breakdown-section h3 {
    margin-bottom: 20px;
    color: #333;
}

.breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.breakdown-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 15px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    align-items: center;
}

.breakdown-name {
    font-weight: 600;
    color: #333;
}

.breakdown-amount {
    font-weight: 600;
    color: #667eea;
}

.breakdown-percentage {
    font-size: 0.9em;
    color: #666;
}

.info-box {
    margin-top: 25px;
    padding: 20px;
    background: #f0f7ff;
    border-left: 4px solid #667eea;
    border-radius: 8px;
}

.info-box p {
    margin: 0;
    color: #555;
    line-height: 1.6;
}

.info-box a {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
}

.info-box a:hover {
    text-decoration: underline;
}

/* Recommended Tools Section */
.tools-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 25px;
    margin-bottom: 30px;
}

.tools-section h3 {
    margin-bottom: 10px;
    color: #333;
}

.tools-subtitle {
    color: #666;
    margin-bottom: 25px;
    font-size: 1em;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.tool-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.tool-card:hover {
    border-color: #667eea;
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.tool-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
}

.tool-header h4 {
    margin: 0;
    font-size: 1.3em;
    font-weight: 600;
}

.tool-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.tool-description {
    color: #333;
    margin: 0 0 10px 0;
    font-weight: 500;
    line-height: 1.5;
}

.tool-note {
    color: #666;
    font-size: 0.9em;
    margin: 0 0 15px 0;
    font-style: italic;
}

.tool-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    flex-grow: 1;
}

.tool-features li {
    padding: 8px 0;
    color: #555;
    position: relative;
    padding-left: 20px;
}

.tool-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

.tool-badge {
    background: #f0fdf4;
    color: #166534;
    padding: 10px 15px;
    border-radius: 6px;
    margin: 15px 0 20px 0;
    text-align: center;
    font-size: 0.9em;
    border: 1px solid #bbf7d0;
    line-height: 1.5;
}

.tool-badge strong {
    font-weight: 600;
    color: #15803d;
}

.tool-link {
    display: inline-block;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    margin-top: auto;
}

.tool-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }
    
    .status-bar {
        grid-template-columns: 1fr;
    }

    .main-nav {
        flex-wrap: wrap;
    }

    .nav-link {
        flex: 1;
        text-align: center;
        min-width: 120px;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .breakdown-item {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .breakdown-percentage {
        text-align: right;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }
}
