/* ===== CALCULATOR.CSS - PIPSBULL FX ===== */
/* Specific styles for compound calculator */

/* Navigation - Mobile First */
.nav-bar {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 15px 5%;
    background: rgba(6, 6, 6, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(214, 0, 0, 0.1);
}

.nav-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.nav-logo img {
    height: 28px;
    width: auto;
}

.nav-logo span {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.nav-link {
    color: #b0b7c4;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 14px;
    background: rgba(255,255,255,0.03);
    border-radius: 100px;
    transition: all 0.3s;
    white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
    color: #d60000;
    background: rgba(214,0,0,0.1);
    border: 1px solid rgba(214,0,0,0.2);
}

/* Back to Home Button */
.back-home {
    margin: 15px 5% 0;
}

.back-home a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #d60000;
    text-decoration: none;
    font-size: 13px;
    padding: 10px 16px;
    background: rgba(214,0,0,0.05);
    border-radius: 100px;
    width: fit-content;
}

/* Hero */
.hero {
    text-align: center;
    margin: 40px 0 30px;
}

.hero-tagline {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 3px;
    color: #ff6b6b;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.hero h1 {
    font-size: clamp(28px, 8vw, 48px);
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 12px;
    line-height: 1.2;
}

.hero h1 span {
    color: #d60000;
}

.hero p {
    color: #cfcfcf;
    font-size: clamp(14px, 4vw, 16px);
    max-width: 600px;
    margin: 0 auto;
    padding: 0 10px;
}

/* Currency Section */
.currency-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin: 25px 0;
}

.currency-selector {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 400px;
    gap: 10px;
    background: #0f1117;
    padding: 12px;
    border-radius: 24px;
    border: 1px solid rgba(214, 0, 0, 0.2);
}

.currency-option {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 14px 20px;
    border-radius: 16px;
    transition: all 0.3s;
    width: 100%;
}

.currency-option.active {
    background: rgba(214, 0, 0, 0.1);
    border: 1px solid #d60000;
}

.currency-option input[type="radio"] {
    accent-color: #d60000;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.currency-option span {
    color: #fff;
    font-weight: 600;
    font-size: 15px;
}

.currency-option small {
    color: #b0b7c4;
    font-size: 12px;
    margin-left: auto;
}

/* Custom Rate Input */
.rate-customizer {
    background: #0f1117;
    border: 1px solid rgba(214, 0, 0, 0.2);
    border-radius: 20px;
    padding: 20px;
    width: 100%;
    max-width: 400px;
    margin-top: 10px;
}

.rate-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: #b0b7c4;
    font-size: 13px;
}

.rate-header i {
    color: #d60000;
}

.rate-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rate-input-group .input-field {
    flex: 1;
    text-align: right;
    font-weight: 600;
    color: #00ff88;
    font-size: 16px;
}

.rate-input-group .suffix {
    color: #d60000;
    font-weight: 600;
    background: rgba(214, 0, 0, 0.1);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    white-space: nowrap;
}

.rate-note {
    font-size: 11px;
    color: #6e7a8a;
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.rate-note i {
    color: #ffa500;
    font-size: 12px;
}

.live-rate-badge {
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s;
    margin-left: auto;
    white-space: nowrap;
}

.live-rate-badge:hover {
    background: rgba(0, 255, 136, 0.2);
}

/* Calculator Grid */
.calculator-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 30px 0;
}

/* Input Panel */
.input-panel {
    background: #0f1117;
    border: 1px solid rgba(214, 0, 0, 0.15);
    border-radius: 24px;
    padding: 20px;
}

.panel-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(214, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-title i {
    color: #d60000;
}

.input-group {
    margin-bottom: 20px;
}

.input-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    color: #b0b7c4;
    font-size: 13px;
}

.input-label i {
    color: #d60000;
    font-size: 12px;
    cursor: help;
}

.input-field {
    width: 100%;
    padding: 14px 16px;
    background: #1a1e2a;
    border: 1px solid rgba(214, 0, 0, 0.2);
    border-radius: 12px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    transition: all 0.3s;
}

.input-field:focus {
    outline: none;
    border-color: #d60000;
    box-shadow: 0 0 0 2px rgba(214, 0, 0, 0.2);
}

.input-with-suffix {
    display: flex;
    align-items: center;
    background: #1a1e2a;
    border: 1px solid rgba(214, 0, 0, 0.2);
    border-radius: 12px;
    overflow: hidden;
}

.input-with-suffix .input-field {
    border: none;
    border-radius: 0;
    flex: 1;
}

.input-with-suffix .suffix {
    padding: 0 16px;
    color: #d60000;
    font-weight: 700;
    background: rgba(214, 0, 0, 0.1);
    height: 100%;
    display: flex;
    align-items: center;
    font-size: 13px;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #1a1e2a;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(214, 0, 0, 0.2);
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 0;
}

.radio-option input[type="radio"] {
    accent-color: #d60000;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.radio-option span {
    color: #fff;
    font-size: 14px;
}

/* Slider */
.slider-container {
    padding: 10px 0;
}

.slider {
    width: 100%;
    height: 4px;
    background: #1a1e2a;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    background: #d60000;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(214, 0, 0, 0.3);
    transition: all 0.2s;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider-values {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    color: #b0b7c4;
    font-size: 11px;
}

/* Result Panel */
.result-panel {
    background: #0f1117;
    border: 1px solid rgba(214, 0, 0, 0.15);
    border-radius: 24px;
    padding: 20px;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(214, 0, 0, 0.1);
}

.result-title {
    font-size: 18px;
    font-weight: 600;
}

.result-badge {
    padding: 4px 12px;
    background: rgba(214, 0, 0, 0.1);
    border-radius: 100px;
    color: #ff6b6b;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    white-space: nowrap;
}

/* Summary Cards */
.summary-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.summary-card {
    background: #1a1e2a;
    border-radius: 16px;
    padding: 18px;
    border: 1px solid rgba(214, 0, 0, 0.1);
    transition: transform 0.3s;
}

.summary-card:hover {
    transform: translateY(-3px);
    border-color: #d60000;
}

.summary-label {
    color: #b0b7c4;
    font-size: 11px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.summary-value {
    font-size: clamp(24px, 6vw, 32px);
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
    line-height: 1.2;
    word-break: break-word;
}

.summary-sub {
    color: #6e7a8a;
    font-size: 11px;
}

.summary-value.positive {
    color: #00c48c;
}

.summary-value.highlight {
    color: #d60000;
    font-size: clamp(28px, 7vw, 36px);
}

/* Chart Container */
.chart-container {
    background: #1a1e2a;
    border-radius: 16px;
    padding: 16px;
    margin: 20px 0;
    border: 1px solid rgba(214, 0, 0, 0.1);
}

.chart-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.chart-title {
    font-size: 15px;
    font-weight: 600;
}

.chart-legend {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}

.legend-color {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.legend-color.balance {
    background: #d60000;
}

.legend-color.profit {
    background: #00c48c;
}

canvas {
    width: 100%;
    height: 250px;
    max-height: 250px;
}

/* Projection Table */
.table-container {
    background: #1a1e2a;
    border-radius: 16px;
    padding: 16px;
    margin-top: 20px;
    border: 1px solid rgba(214, 0, 0, 0.1);
    max-height: 350px;
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.table-title {
    font-size: 15px;
    font-weight: 600;
}

.table-btn {
    background: transparent;
    border: 1px solid rgba(214, 0, 0, 0.3);
    color: #fff;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.table-btn:hover {
    border-color: #d60000;
    background: rgba(214, 0, 0, 0.1);
}

table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    font-size: 12px;
}

th {
    text-align: left;
    padding: 12px 8px;
    color: #b0b7c4;
    font-weight: 600;
    font-size: 11px;
    border-bottom: 1px solid rgba(214, 0, 0, 0.1);
    position: sticky;
    top: 0;
    background: #1a1e2a;
    z-index: 10;
    white-space: nowrap;
}

td {
    padding: 10px 8px;
    color: #fff;
    font-size: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    white-space: nowrap;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(214, 0, 0, 0.05);
}

td.positive {
    color: #00c48c;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 25px;
}

.btn-primary {
    padding: 16px;
    background: linear-gradient(135deg, #d60000 0%, #b30000 100%);
    color: #fff;
    border: none;
    border-radius: 100px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(214, 0, 0, 0.3);
}

.btn-secondary {
    padding: 16px;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(214, 0, 0, 0.3);
    border-radius: 100px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.btn-secondary:hover {
    border-color: #d60000;
    background: rgba(214, 0, 0, 0.05);
}

/* Info Cards */
.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 30px;
}

.info-card {
    background: #0a0c10;
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(214, 0, 0, 0.1);
}

.info-icon {
    width: 40px;
    height: 40px;
    background: rgba(214, 0, 0, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.info-icon i {
    color: #d60000;
    font-size: 20px;
}

.info-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.info-text {
    color: #b0b7c4;
    font-size: 13px;
    line-height: 1.6;
}

/* Goal Progress */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #1a1e2a;
    border-radius: 4px;
    margin-top: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #d60000;
    border-radius: 4px;
    transition: width 0.3s;
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 0 20px;
    border-top: 1px solid rgba(214,0,0,0.1);
    color: #6e7a8a;
    font-size: 12px;
    margin-top: 40px;
}

.footer a {
    color: #d60000;
    text-decoration: none;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 15px 0;
}

.footer-links a {
    font-size: 12px;
}

/* Sticky Mobile Navigation */
.sticky-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    z-index: 99;
    background: rgba(11,11,11,0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(214,0,0,0.1);
    padding: 8px;
    gap: 8px;
}

.sticky-nav a {
    flex: 1;
    padding: 12px 8px;
    text-align: center;
    color: #fff;
    text-decoration: none;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.sticky-nav .home-btn {
    background: rgba(214,0,0,0.8);
}

.sticky-nav .nav-btn {
    background: rgba(0,0,0,0.5);
}

/* Responsive */
@media (min-width: 600px) {
    .nav-bar {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 15px 5%;
    }
    
    .nav-logo {
        justify-content: flex-start;
    }
    
    .nav-links {
        justify-content: flex-end;
    }
    
    .currency-selector {
        flex-direction: row;
        border-radius: 100px;
        padding: 8px;
    }
    
    .radio-group {
        flex-direction: row;
        gap: 20px;
    }
    
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .action-buttons {
        flex-direction: row;
    }
}

@media (min-width: 900px) {
    .container {
        padding: 40px 5%;
    }
    
    .calculator-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .info-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .chart-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    table {
        min-width: 100%;
    }
}