/* Calculator Page Specific Styles */

.calculator-page {
    min-height: 100vh;
    background: #0a0a0a;
    color: #ffffff;
}

.calculator-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 2rem 0;
    border-bottom: 2px solid #00ffff;
    text-align: center;
}

.breadcrumb {
    text-align: left;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #00ffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.breadcrumb span {
    color: #cccccc;
}

.calculator-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #00ffff;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.calculator-subtitle {
    font-size: 1.2rem;
    color: #cccccc;
    max-width: 600px;
    margin: 0 auto;
}

/* Algorithm Explanation */
.algorithm-explanation {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(0, 255, 255, 0.2);
    margin-bottom: 3rem;
}

.algorithm-explanation h3 {
    font-size: 1.5rem;
    color: #00ffff;
    margin-bottom: 1.5rem;
    text-align: center;
}

.algorithm-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.step {
    background: rgba(0, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(0, 255, 255, 0.1);
}

.step h4 {
    font-size: 1.1rem;
    color: #00ffff;
    margin-bottom: 1rem;
}

.step p {
    color: #cccccc;
    margin-bottom: 1rem;
    line-height: 1.5;
}

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

.step li {
    color: #cccccc;
    padding: 0.3rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.step li::before {
    content: '→';
    color: #00ffff;
    position: absolute;
    left: 0;
}

/* Form Grid Layout */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

/* Income Streams Grid */
.income-streams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.income-stream {
    background: rgba(0, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(0, 255, 255, 0.1);
}

.income-stream h4 {
    font-size: 1.2rem;
    color: #00ffff;
    margin-bottom: 1rem;
    text-align: center;
}

/* Form Help Styling */
.form-help {
    font-size: 0.85rem;
    color: #888888;
    margin-top: 0.3rem;
    line-height: 1.4;
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
    .income-streams-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .income-stream {
        padding: 1rem;
    }
    
    .algorithm-steps {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .step {
        padding: 1rem;
    }
    
    .algorithm-explanation {
        padding: 1.5rem;
    }
}

.calculator-content {
    padding: 3rem 0;
}

.calculator-form {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(0, 255, 255, 0.2);
    margin-bottom: 3rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: #0a0a0a;
    border: 1px solid #333333;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #00ffff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.form-select {
    width: 100%;
    padding: 0.8rem 1rem;
    background: #0a0a0a;
    border: 1px solid #333333;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-select:focus {
    outline: none;
    border-color: #00ffff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.form-help {
    font-size: 0.85rem;
    color: #888888;
    margin-top: 0.3rem;
}

.calculate-button {
    background: linear-gradient(135deg, #00ffff, #0099cc);
    color: #000000;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 1rem;
}

.calculate-button:hover {
    background: linear-gradient(135deg, #0099cc, #00ffff);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 255, 255, 0.3);
}

.calculate-button:disabled {
    background: #333333;
    color: #666666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Results Section */
.results-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(0, 255, 255, 0.2);
    margin-bottom: 3rem;
    display: none;
}

.results-section.show {
    display: block;
    animation: slideIn 0.5s ease;
}

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

.results-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #00ffff;
    margin-bottom: 1.5rem;
    text-align: center;
}

.result-item {
    background: rgba(0, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.result-label {
    font-size: 0.9rem;
    color: #cccccc;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #00ffff;
    margin-bottom: 0.5rem;
}

.result-description {
    color: #cccccc;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Status Labels */
.status-label {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-left: 0.5rem;
}

.status-danger {
    background: rgba(255, 69, 58, 0.2);
    color: #ff453a;
    border: 1px solid rgba(255, 69, 58, 0.3);
}

.status-warning {
    background: rgba(255, 159, 10, 0.2);
    color: #ff9f0a;
    border: 1px solid rgba(255, 159, 10, 0.3);
}

.status-success {
    background: rgba(52, 199, 89, 0.2);
    color: #34c759;
    border: 1px solid rgba(52, 199, 89, 0.3);
}

.status-info {
    background: rgba(0, 122, 255, 0.2);
    color: #007aff;
    border: 1px solid rgba(0, 122, 255, 0.3);
}

/* Chart Container - IMPROVED RESPONSIVE */
.chart-container {
    background: #0a0a0a;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 1px solid rgba(0, 255, 255, 0.2);
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    min-height: 300px;
    position: relative;
}

.chart-container canvas {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 auto;
}

.chart-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 1rem;
    text-align: center;
    word-wrap: break-word;
}

.chart-wrapper {
    position: relative;
    width: 100%;
    height: 300px;
    max-height: 400px;
}

/* Responsive Chart Container */
@media (max-width: 768px) {
    .chart-container {
        padding: 1rem;
        margin: 1rem 0;
        min-height: 280px;
    }
    
    .chart-container canvas {
        max-height: 250px;
    }
    
    .chart-title {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }
}

@media (max-width: 480px) {
    .chart-container {
        padding: 0.8rem;
        margin: 0.8rem 0;
        min-height: 250px;
    }
    
    .chart-container canvas {
        max-height: 200px;
    }
    
    .chart-title {
        font-size: 1rem;
        margin-bottom: 0.6rem;
    }
}

/* Comparison Grid */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.comparison-card {
    background: rgba(0, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(0, 255, 255, 0.2);
    text-align: center;
}

.comparison-card h4 {
    font-size: 1.1rem;
    color: #ffffff;
    margin-bottom: 1rem;
}

.comparison-value {
    font-size: 2rem;
    font-weight: 700;
    color: #00ffff;
    margin-bottom: 0.5rem;
}

.comparison-label {
    font-size: 0.9rem;
    color: #cccccc;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 2rem;
    color: #cccccc;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #333333;
    border-radius: 50%;
    border-top-color: #00ffff;
    animation: spin 1s ease-in-out infinite;
    margin-left: 0.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error State */
.error-message {
    background: rgba(255, 69, 58, 0.1);
    border: 1px solid rgba(255, 69, 58, 0.3);
    border-radius: 8px;
    padding: 1rem;
    color: #ff453a;
    text-align: center;
    margin: 1rem 0;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .calculator-title {
        font-size: 2rem;
    }
    
    .calculator-form,
    .results-section {
        padding: 1.5rem;
    }
    
    .algorithm-steps {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-input,
    .form-select {
        padding: 0.7rem 0.9rem;
    }
    
    .calculate-button {
        padding: 0.9rem 1.5rem;
        font-size: 1rem;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .step {
        padding: 1rem;
    }
    
    .algorithm-explanation {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .calculator-title {
        font-size: 1.8rem;
    }
    
    .calculator-form,
    .results-section {
        padding: 1.2rem;
    }
    
    .algorithm-explanation {
        padding: 1rem;
    }
    
    .algorithm-explanation h3 {
        font-size: 1.3rem;
    }
    
    .step h4 {
        font-size: 1rem;
    }
    
    .result-value {
        font-size: 1.3rem;
    }
    
    .comparison-value {
        font-size: 1.5rem;
    }
    
    .breadcrumb {
        font-size: 0.8rem;
    }
}
