/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    min-height: 100vh;
    line-height: 1.6;
    padding: 20px;
}

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

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Main Content */
main {
    padding: 30px;
}

/* Collapsible Instructions */
.instructions {
    background: #f8f9fa;
    border: 2px solid #667eea;
    padding: 0;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}

.instructions summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    list-style: none;
    user-select: none;
    transition: background 0.3s ease;
}

.instructions summary::-webkit-details-marker {
    display: none;
}

.instructions summary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.instructions-content {
    padding: 20px;
}

.instructions-content ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.instructions-content li {
    margin-bottom: 8px;
}

.example {
    background: white;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #dee2e6;
    margin-top: 15px;
}

/* Controls */
.controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.control-group {
    display: flex;
    flex-direction: column;
}

.control-group label {
    font-weight: bold;
    margin-bottom: 8px;
    color: #495057;
}

.select-input {
    padding: 12px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.select-input:hover {
    border-color: #667eea;
}

.select-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Progressive Converter Section */
.progressive-converter {
    background: #fff3cd;
    border: 2px solid #ffc107;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.progressive-converter h3 {
    color: #856404;
    margin-bottom: 10px;
}

.converter-note {
    font-size: 0.9rem;
    color: #856404;
    margin-bottom: 20px;
    font-style: italic;
}

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

.converter-input label {
    font-weight: bold;
    color: #856404;
    min-width: 150px;
}

.jackpot-input {
    flex: 1;
    max-width: 300px;
    padding: 12px;
    border: 2px solid #ffc107;
    border-radius: 8px;
    font-size: 1.1rem;
    background: white;
}

.jackpot-input:focus {
    outline: none;
    border-color: #ff9800;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.2);
}

.coin-conversions {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ffc107;
}

.coin-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.coin-row:last-child {
    border-bottom: none;
}

.coin-label {
    font-weight: 600;
    color: #495057;
    font-size: 1.05rem;
}

.coin-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: #28a745;
}

.converter-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.calculator-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.btn-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* Payout Inputs Section */
.payout-inputs {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.payout-inputs h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.payout-note {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 20px;
    font-style: italic;
}

.payout-fields {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.payout-field {
    display: flex;
    flex-direction: column;
}

.payout-field label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #495057;
    font-size: 0.95rem;
}

.payout-field input {
    padding: 10px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.payout-field input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.payout-field input.error {
    border-color: #dc3545;
}

.payout-field .error-message {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 4px;
}

/* Results Section */
.results {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.results h2 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 2rem;
}

.result-main {
    background: rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.payback-display,
.return-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.payback-display:last-child,
.return-display:last-child {
    border-bottom: none;
}

.payback-display .label,
.return-display .label {
    font-size: 1.1rem;
    font-weight: 500;
}

.payback-display .value,
.return-display .value {
    font-size: 2rem;
    font-weight: bold;
}

.payback-display .value {
    color: #ffd700;
}

/* Probability Breakdown */
.probability-breakdown {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
}

.probability-breakdown h3 {
    margin-bottom: 15px;
    text-align: center;
}

.probability-table {
    display: grid;
    gap: 8px;
}

.probability-row {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    align-items: center;
}

.probability-row .catches {
    font-weight: bold;
}

.probability-row .prob-bar {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
}

.probability-row .prob-fill {
    background: #ffd700;
    height: 100%;
    transition: width 0.5s ease;
}

.probability-row .percentage {
    text-align: right;
    font-size: 0.9rem;
}

/* Footer */
footer {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
}

footer p {
    margin: 5px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header h1 {
        font-size: 2rem;
    }

    main {
        padding: 20px;
    }

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

    .payout-fields {
        grid-template-columns: 1fr;
    }

    .probability-row {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .probability-row .percentage {
        text-align: center;
    }

    .payback-display,
    .return-display {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}