@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.4;
    color: #ffffff;
    background: black;
    min-height: 100vh;
    padding: 15px;
    font-size: 14px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #171a21 0%, #1b2838 100%);
    color: #c7d5e0;
    padding: 25px;
    text-align: center;
    border-bottom: 2px solid #66c0f4;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
    font-weight: 600;
    color: #ffffff;
}

header p {
    opacity: 0.8;
    font-size: 0.95rem;
    color: #8f98a0;
}

.formula-breakdown {
    margin-top: 20px;
    padding: 15px;
    background: rgba(26, 29, 39, 0.8);
    border-radius: 8px;
    border: 1px solid #316282;
}

.formula-breakdown h3 {
    color: #66c0f4;
    font-size: 0.9rem;
    margin-bottom: 10px;
    font-weight: 500;
}

.formula-steps {
    display: grid;
    gap: 4px;
}

.formula-steps p {
    margin: 0;
    font-size: 0.8rem;
    color: #c7d5e0;
    opacity: 0.9;
}

.formula-steps strong {
    color: #66c0f4;
    font-weight: 500;
}

.calculator-section {
    background: #1e2329;
    padding: 20px;
}

.section-card {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 25px;
}

.section-card:hover {
    transform: none;
    box-shadow: none;
}

.section-card h2 {
    color: #c7d5e0;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

.input-group {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.input-method-toggle {
    display: flex;
    background: #2a475e;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 20px;
    border: 1px solid #316282;
}

.toggle-btn {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: #8f98a0;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.toggle-btn.active {
    background: #66c0f4;
    color: #171a21;
    font-weight: 600;
}

.toggle-btn:hover:not(.active) {
    background: rgba(102, 192, 244, 0.1);
    color: #c7d5e0;
}

.input-method-section {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.input-method-section.hidden {
    display: none;
}

.input-group label {
    width: 160px;
    min-width: 160px;
    font-weight: 500;
    color: #8f98a0;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.input-group input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #316282;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #2a475e;
    color: #c7d5e0;
}

.input-group input:focus {
    outline: none;
    border-color: #66c0f4;
    box-shadow: 0 0 0 2px rgba(102, 192, 244, 0.2);
}

.input-group input:hover {
    border-color: #4c9cd6;
}

.input-group input::placeholder {
    color: #5c7e90;
}

.btn-primary, .btn-secondary {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #66c0f4 0%, #4c9cd6 100%);
    color: #171a21;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4c9cd6 0%, #3d8ab8 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(102, 192, 244, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #5ba824 0%, #4a8c1a 100%);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #4a8c1a 0%, #3d7315 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(91, 168, 36, 0.4);
}

.btn-fetch {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    background: linear-gradient(135deg, #ff6b35 0%, #e85a2b 100%);
    color: white;
    margin-bottom: 15px;
}

.btn-fetch:hover {
    background: linear-gradient(135deg, #e85a2b 0%, #d44b21 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(255, 107, 53, 0.4);
}

.fetched-data {
    margin-top: 15px;
    padding: 15px;
    background: #1b2838;
    border-radius: 8px;
    border: 1px solid #316282;
}

.game-info h4 {
    color: #66c0f4;
    margin: 0 0 10px 0;
    font-size: 1rem;
    font-weight: 600;
}

.data-preview {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.data-preview span {
    color: #8f98a0;
    font-size: 0.85rem;
}

.data-preview strong {
    color: #c7d5e0;
    font-weight: 600;
}

.manual-review-input {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #316282;
}

.manual-review-input small {
    display: block;
    margin-top: 8px;
    color: #8f98a0;
    font-size: 0.75rem;
    line-height: 1.3;
}

.result-box {
    margin-top: 15px;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    animation: slideIn 0.5s ease-out;
}

.result-box h3 {
    color: #c7d5e0;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.breakdown {
    border: 1px solid #316282;
    border-radius: 6px;
    overflow: hidden;
    background: #2a475e;
}

.breakdown p {
    margin: 0;
    padding: 8px 12px;
    border-bottom: 1px solid #316282;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #c7d5e0;
    background: rgba(42, 71, 94, 0.3);
    transition: background-color 0.2s ease;
}

.breakdown p:hover {
    background: rgba(42, 71, 94, 0.6);
}

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

.breakdown p strong {
    color: #66c0f4;
    font-weight: 500;
    min-width: 60%;
    text-align: left;
}

.breakdown p span {
    font-weight: 600;
    color: #ffffff;
    text-align: right;
    font-family: 'Monaco', 'Consolas', monospace;
}

.total-revenue {
    background: rgba(91, 168, 36, 0.3) !important;
    border-left: 3px solid #5ba824 !important;
    font-size: 0.9rem !important;
}

.total-revenue strong {
    color: #7ec850 !important;
}

.total-revenue span {
    color: #7ec850 !important;
    font-weight: 700 !important;
}

.yearly-earnings {
    background: rgba(255, 193, 7, 0.3) !important;
    border-left: 3px solid #ffc107 !important;
    font-size: 0.9rem !important;
}

.yearly-earnings strong {
    color: #ffd54f !important;
}

.yearly-earnings span {
    color: #ffd54f !important;
    font-weight: 700 !important;
}

.hidden {
    display: none;
}

footer {
    background: #171a21;
    padding: 20px;
    text-align: center;
    color: #5c7e90;
    border-top: 1px solid #316282;
    font-size: 0.8rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.copyright p {
    margin: 0;
    color: #8f98a0;
}

.copyright a {
    color: #66c0f4;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.copyright a:hover {
    color: #4c9cd6;
    text-decoration: underline;
}

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

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

.section-card.show {
    animation: fadeIn 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
        font-size: 13px;
    }
    
    .container {
        border-radius: 12px;
    }
    
    header {
        padding: 15px;
    }
    
    header h1 {
        font-size: 1.6rem;
    }
    
    .calculator-section {
        padding: 15px;
    }
    
    .section-card {
        padding: 15px;
    }
    
    .input-group {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .input-group label {
        min-width: auto;
    }
}

/* Loading state */
.btn-primary:disabled, .btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Input validation styles */
.input-group input.error {
    border-color: #cd5c5c;
    box-shadow: 0 0 0 2px rgba(205, 92, 92, 0.2);
}

.input-group input.success {
    border-color: #5ba824;
    box-shadow: 0 0 0 2px rgba(91, 168, 36, 0.2);
}