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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    padding: 20px 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 30px;
}

header h1 {
    font-size: 1.8rem;
    color: #333;
}

.form-section {
    padding: 20px 0;
    margin-bottom: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 120px;
    gap: 15px;
    align-items: end;
}

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

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.form-group input {
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #4a90e2;
}

.btn {
    padding: 10px 24px;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    background: #4a90e2;
    color: white;
    transition: background 0.3s;
}

.btn:hover {
    background: #357abd;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.loading {
    text-align: center;
    padding: 40px;
    display: none;
}

.loading.show {
    display: block;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4a90e2;
    border-radius: 50%;
    margin: 0 auto 15px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    border-left: 4px solid #c33;
    display: none;
}

.error-message.show {
    display: block;
}

.results-section {
    display: none;
}

.results-section.show {
    display: block;
}

.results-section h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.4rem;
}

.bets-container {
    display: grid;
    gap: 20px;
}

.bet-card {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
    transition: all 0.2s;
}

.bet-card:hover {
    border-color: #4a90e2;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.1);
}

.bet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.bet-id {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
}

.bet-outcome {
    padding: 5px 14px;
    border-radius: 3px;
    font-weight: 600;
    font-size: 0.85rem;
}

.bet-outcome.won {
    background: #d4edda;
    color: #155724;
}

.bet-outcome.lost {
    background: #f8d7da;
    color: #721c24;
}

.bet-outcome.pending {
    background: #fff3cd;
    color: #856404;
}

.bet-info {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.7rem;
    color: #888;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

.bet-events {
    margin-top: 15px;
}

.bet-events h4 {
    margin-bottom: 10px;
    color: #555;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-item {
    background: #ffffff;
    padding: 14px;
    border-radius: 4px;
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
}

.event-item:last-child {
    margin-bottom: 0;
}

.event-game {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.event-details {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
}

.event-market {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.market-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.market-odds {
    background: #4a90e2;
    color: white;
    padding: 3px 10px;
    border-radius: 3px;
    font-weight: bold;
    font-size: 0.9rem;
}

@media (max-width: 1024px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }

    .form-group:nth-child(1) {
        grid-column: 1 / -1;
    }

    .btn {
        grid-column: 1 / -1;
    }

    .bet-info {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .bet-info {
        grid-template-columns: repeat(2, 1fr);
    }
}
