/* Earnings Calculator Modal Styles */
.earnings-calculator-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease-out;
    align-items: center;
    justify-content: center;
}

.earnings-calculator-modal.modal-open {
    display: flex !important;
}

.earnings-calculator-modal.modal-closed,
.earnings-calculator-modal.modal-open.modal-closed,
.earnings-calculator-modal[style*="display: none"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -1 !important;
    position: fixed !important;
    left: -9999px !important;
    top: -9999px !important;
}

.earnings-calculator-content {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    margin: 3% auto;
    padding: 0;
    border: 2px solid #00FFFF;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 255, 255, 0.3);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
    position: relative;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.earnings-calculator-content::-webkit-scrollbar {
    display: none;
}

.calculator-header {
    background: #000000;
    color: #fff;
    padding: 20px 60px 20px 30px;
    border-radius: 18px 18px 0 0;
    text-align: center;
    position: relative;
    border-bottom: 2px solid #00FFFF;
}

.calculator-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
    color: #00FFFF;
}

.calculator-header p {
    margin: 8px 0 0;
    font-size: 14px;
    color: #ccc;
}

.calculator-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: all 0.3s;
    z-index: 10;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.calculator-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
    color: #00FFFF;
}

.calculator-body {
    padding: 30px;
}

.calculator-inputs {
    display: block;
    margin-bottom: 30px;
}

/* Single input taking full width on desktop */
.calculator-inputs .input-group {
    max-width: 400px;
    margin: 0 auto 25px auto;
}

.input-group {
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.input-group:hover {
    border-color: #00FFFF;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

.input-group label {
    display: block;
    color: #00FFFF;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 16px;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #333;
    border-radius: 8px;
    background: #2a2a2a;
    color: #fff;
    font-size: 18px;
    text-align: center;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

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

.calculator-results {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1), rgba(0, 255, 255, 0.05));
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
}

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

.result-card {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.result-card:hover {
    transform: translateY(-3px);
    border-color: #00FFFF;
    box-shadow: 0 8px 25px rgba(0, 255, 255, 0.2);
}

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

.result-value {
    font-size: 28px;
    font-weight: bold;
    color: #00FFFF;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    line-height: 1.1;
}

.earnings-breakdown {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.earnings-breakdown h3 {
    color: #ffffff;
    font-size: 18px;
    margin: 0 0 15px 0;
    text-align: center;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #cccccc;
}

.breakdown-item:last-child {
    border-bottom: none;
}

.breakdown-value {
    color: #00FFFF;
    font-weight: bold;
}

.cta-section {
    text-align: center;
    padding: 20px 0;
}

.cta-text {
    color: #ffffff;
    font-size: 16px;
    margin-bottom: 20px;
}

.cta-button {
    display: inline-block;
    background-color: #FF1493;
    color: #ffffff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 16px;
    text-transform: none;
    letter-spacing: normal;
}

.cta-button:hover {
    background-color: rgba(255, 20, 147, 0.85);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 20, 147, 0.3);
    color: #ffffff;
}

.results-header {
    text-align: center;
    margin-bottom: 25px;
}

.results-header h3 {
    color: #00FFFF;
    font-size: 24px;
    margin: 0 0 10px;
}

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

.metric-card {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-5px);
    border-color: #00FFFF;
}

.metric-value {
    font-size: 28px;
    font-weight: bold;
    color: #00FFFF;
    margin: 0;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    line-height: 1.1;
}

.metric-label {
    color: #ccc;
    font-size: 13px;
    margin: 10px 0 0;
    line-height: 1.3;
}

.chart-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    overflow: visible;
    min-height: 320px;
    display: block;
    width: 100%;
}

.chart-title {
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 30px;
    text-align: center;
    padding-bottom: 10px;
    position: relative;
    z-index: 1;
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 200px;
    padding: 30px 20px 60px;
    border-bottom: 2px solid #333;
    gap: 8px;
    position: relative;
    margin-top: 0;
    width: 100%;
}

.bar {
    background: linear-gradient(to top, #00FFFF, #FF1493);
    border-radius: 4px 4px 0 0;
    position: relative;
    transition: all 0.5s ease;
    min-width: 20px;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.bar:hover {
    filter: brightness(1.2);
    transform: scale(1.05);
}

.bar-value {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 8px;
    font-weight: bold;
    white-space: nowrap;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 1);
    background: rgba(0, 0, 0, 0.9);
    padding: 2px 4px;
    border-radius: 3px;
    z-index: 10;
    min-width: 30px;
    text-align: center;
}

.bar-label {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    color: #ccc;
    font-size: 7px;
    text-align: center;
    white-space: nowrap;
    line-height: 1;
    width: 40px;
}

.assumptions {
    background: rgba(255, 20, 147, 0.1);
    border: 1px solid rgba(255, 20, 147, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin-top: 25px;
}

.assumptions h4 {
    color: #FF1493;
    margin: 0 0 15px;
    font-size: 16px;
}

.assumptions ul {
    margin: 0;
    padding-left: 20px;
    color: #ccc;
}

.assumptions li {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.4;
}

.calculator-cta {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #333;
}

.calculator-cta .button {
    background: #00FFFF;
    color: #000;
    padding: 15px 40px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    display: inline-block;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.3);
}

.calculator-cta .button:hover {
    background: #00e6e6;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 255, 255, 0.5);
}

/* Desktop Optimizations */
@media (min-width: 769px) {
    .earnings-calculator-content {
        max-height: 85vh;
        height: auto;
        overflow-y: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .earnings-calculator-content::-webkit-scrollbar {
        display: none;
    }
    
    .calculator-body {
        overflow: visible;
        max-height: none;
    }
    
    .chart-container {
        margin-top: 30px;
        padding: 30px;
        min-height: 350px;
    }
    
    .bar-chart {
        height: 250px;
        padding: 40px 30px 80px;
        gap: 12px;
    }
    
    .bar {
        min-width: 30px;
        flex: 1;
        max-width: 60px;
    }
    
    .bar-value {
        font-size: 11px;
        top: -30px;
        padding: 4px 6px;
    }
    
    .bar-label {
        font-size: 10px;
        bottom: -60px;
        width: 50px;
    }
    
    .results-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
    
    .calculator-inputs .input-group {
        max-width: 500px;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .earnings-calculator-content {
        margin: 0;
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        border: none;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }
    

    
    .calculator-header {
        padding: 20px 60px 20px 20px;
        border-radius: 0;
        flex-shrink: 0;
    }
    
    .calculator-header h2 {
        font-size: 22px;
        line-height: 1.2;
    }
    
    .calculator-header p {
        font-size: 16px;
    }
    
    .calculator-close {
        top: 18px;
        right: 18px;
        font-size: 22px;
        width: 32px;
        height: 32px;
    }
    
    .calculator-body {
        padding: 20px 15px;
    }
    
    .calculator-inputs {
        grid-template-columns: 1fr !important;
        justify-content: stretch !important;
        margin-bottom: 25px;
        width: 100% !important;
        padding: 0 !important;
    }
    
    .input-group {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
    }
    
    .input-group {
        padding: 15px;
    }
    
    .input-group label {
        font-size: 14px;
    }
    
    .input-group input {
        padding: 10px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
        -webkit-appearance: none;
        -moz-appearance: textfield;
    }
    
    .calculator-results {
        padding: 20px 15px;
    }
    
    .results-header h3 {
        font-size: 20px;
    }
    
    .key-metrics {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 25px;
    }
    
    .metric-card {
        padding: 15px;
    }
    
    .metric-value {
        font-size: 24px;
    }
    
    .metric-label {
        font-size: 13px;
    }
    
    .earnings-chart-container {
        background: rgba(0, 0, 0, 0.3);
        border-radius: 12px;
        padding: 20px 0 50px;
        margin: 20px 15px;
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        position: relative;
    }
    
    /* Custom scrollbar for mobile chart */
    .earnings-chart-container::-webkit-scrollbar {
        height: 8px;
    }
    
    .earnings-chart-container::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.2);
        border-radius: 4px;
    }
    
    .earnings-chart-container::-webkit-scrollbar-thumb {
        background: linear-gradient(90deg, #FF1493, #FF69B4);
        border-radius: 4px;
    }
    
    .earnings-chart-container::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(90deg, #FF69B4, #FF1493);
    }
    
    /* Firefox scrollbar styling */
    .earnings-chart-container {
        scrollbar-width: thin;
        scrollbar-color: #FF1493 rgba(0, 0, 0, 0.2);
    }
    
    .earnings-chart {
        height: 160px;
        display: flex;
        align-items: flex-end;
        gap: 8px;
        padding: 20px 20px 60px;
        border-bottom: 2px solid #333;
        min-width: 700px;
        width: 700px;
        position: relative;
    }
    
    .chart-title {
        font-size: 18px;
        margin: 0 0 30px;
        padding: 0 20px;
        text-align: center;
        color: #fff;
        font-weight: bold;
    }
    
    .bar-chart {
        height: 160px;
        display: flex;
        align-items: flex-end;
        gap: 8px;
        padding: 20px 20px 60px;
        border-bottom: 2px solid #333;
        min-width: 700px;
        width: 700px;
        position: relative;
    }
    
    .bar {
        min-width: 45px;
        flex: none;
        position: relative;
        background: linear-gradient(to top, #00FFFF, #FF1493);
        border-radius: 4px 4px 0 0;
    }
    
    .bar-value {
        position: absolute;
        top: -25px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 10px;
        color: #fff;
        background: rgba(0, 0, 0, 0.8);
        padding: 2px 4px;
        border-radius: 3px;
        font-weight: bold;
        white-space: nowrap;
        min-width: 30px;
        text-align: center;
    }
    
    .bar-label {
        position: absolute;
        bottom: -50px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 9px;
        color: #ccc;
        text-align: center;
        width: 50px;
        line-height: 1.1;
        font-weight: 500;
    }
    
    .chart-container::after {
        content: "← Swipe to see all months →";
        position: absolute;
        bottom: 8px;
        left: 50%;
        transform: translateX(-50%);
        color: #00FFFF;
        font-size: 12px;
        font-style: italic;
        text-align: center;
    }
    
    .assumptions {
        padding: 15px;
        margin-top: 20px;
    }
    
    .assumptions h4 {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .assumptions ul {
        padding-left: 15px;
    }
    
    .assumptions li {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .calculator-cta {
        margin-top: 25px;
        padding-top: 20px;
    }
    
    .calculator-cta .button {
        padding: 12px 30px;
        font-size: 16px;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .calculator-body {
        padding: 20px 15px;
    }
    
    .calculator-inputs {
        justify-content: stretch;
    }
    
    .input-group {
        padding: 15px 20px !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    
    .input-label {
        font-size: 16px;
    }
    
    .input-field {
        font-size: 16px;
        padding: 12px;
        min-height: 45px;
    }
    
    .key-metrics {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .metric-value {
        font-size: 24px;
    }
    
    .metric-card {
        padding: 16px;
    }
    
    .chart-container {
        background: rgba(0, 0, 0, 0.3);
        border-radius: 12px;
        padding: 15px 0 25px;
        margin: 15px 10px;
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        position: relative;
    }
    
    .chart-title {
        font-size: 16px;
        margin: 0 0 25px;
        padding: 0 15px;
        text-align: center;
        color: #fff;
        font-weight: bold;
    }
    
    .bar-chart {
        height: 140px;
        display: flex;
        align-items: flex-end;
        gap: 6px;
        padding: 15px 15px 30px;
        border-bottom: 2px solid #333;
        min-width: 600px;
        width: 600px;
        position: relative;
    }
    
    .bar {
        min-width: 40px;
        flex: none;
        position: relative;
        background: linear-gradient(to top, #00FFFF, #FF1493);
        border-radius: 3px 3px 0 0;
    }
    
    .bar-value {
        position: absolute;
        top: -22px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 9px;
        color: #fff;
        background: rgba(0, 0, 0, 0.8);
        padding: 1px 3px;
        border-radius: 2px;
        font-weight: bold;
        white-space: nowrap;
        min-width: 25px;
        text-align: center;
    }
    
    .bar-label {
        position: absolute;
        bottom: -40px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 8px;
        color: #ccc;
        text-align: center;
        width: 45px;
        line-height: 1;
        font-weight: 500;
    }
    
    .chart-container::after {
        content: "← Swipe →";
        position: absolute;
        bottom: 3px;
        left: 50%;
        transform: translateX(-50%);
        color: #00FFFF;
        font-size: 10px;
        font-style: italic;
        text-align: center;
    }
    
    .calculator-assumptions {
        padding: 16px;
    }
    
    .calculator-assumptions h3 {
        font-size: 16px;
    }
    
    .calculator-assumptions li {
        font-size: 13px;
    }
    
    .calculator-cta {
        padding: 20px 15px;
    }
    
    .calculator-cta .button {
        font-size: 16px;
        padding: 15px 35px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.calculator-body > * {
    animation: slideUp 0.6s ease-out forwards;
}

.calculator-body > *:nth-child(1) { animation-delay: 0.1s; }
.calculator-body > *:nth-child(2) { animation-delay: 0.2s; }
.calculator-body > *:nth-child(3) { animation-delay: 0.3s; }
.calculator-body > *:nth-child(4) { animation-delay: 0.4s; }

/* Growth Assumptions Styling */
.growth-assumptions {
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.growth-assumptions h3 {
    color: #00FFFF;
    font-size: 18px;
    margin: 0 0 15px;
    text-align: center;
}

.assumption-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.assumption-item:last-child {
    border-bottom: none;
}

.assumption-item span {
    color: #ffffff;
    font-size: 14px;
}

.assumption-value {
    color: #00FFFF !important;
    font-weight: 600;
}

/* Earnings Chart Styling */
.earnings-chart-container {
    margin: 25px 0;
}

.earnings-chart-container h3 {
    color: #00FFFF;
    font-size: 18px;
    margin: 0 0 15px;
    text-align: center;
}

.earnings-chart {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 12px;
    padding: 20px;
    min-height: 250px;
    display: flex;
    align-items: end;
    gap: 2px;
}

.chart-bar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    margin: 0 1px;
}

.chart-bar {
    background: linear-gradient(to top, #00ffff, #40e0d0);
    width: 100%;
    border-radius: 4px 4px 0 0;
    margin-bottom: 5px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.chart-bar:hover {
    background: linear-gradient(to top, #40e0d0, #00ffff);
    transform: scaleY(1.05);
}

.chart-label {
    font-size: 11px;
    color: #ffffff;
    text-align: center;
    margin-top: 5px;
}

.chart-value {
    font-size: 10px;
    color: #00ffff;
    text-align: center;
    margin-top: 2px;
    font-weight: 600;
}