/* 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, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
h1 {
    text-align: center;
    color: white;
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    font-weight: bold;
}

h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8rem;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

h3 {
    color: #444;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

/* Sections */
.section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

/* Buttons */
button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

input, select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.stat-card h3 {
    color: white;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.stat-card p {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: bold;
    font-size: 14px;
}

tr:hover {
    background-color: #f8f9fa;
}

/* Action Buttons */
.bet-btn, .resolve-btn, .claim-btn, .hide-btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    color: white;
}

.bet-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.resolve-btn {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

.claim-btn {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
}

.hide-btn {
    background: linear-gradient(135deg, #9e9e9e 0%, #757575 100%);
}

.bet-btn:hover, .resolve-btn:hover, .claim-btn:hover, .hide-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.bet-status, .house-prediction, .no-action {
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
}

.bet-status {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.house-prediction {
    background: #fff3e0;
    color: #f57c00;
    border: 1px solid #ffcc02;
}

.no-action {
    background: #f5f5f5;
    color: #757575;
    border: 1px solid #e0e0e0;
}

/* Quick Bet Section */
.quick-bet-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
    color: white;
}

.quick-bet-section h3 {
    margin-top: 0;
    color: white;
}

/* Available Predictions */
.available-predictions {
    margin-top: 30px;
}

.predictions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.prediction-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.prediction-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.prediction-card h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
}

.prediction-text {
    font-size: 14px;
    color: #666;
    margin: 10px 0;
    line-height: 1.4;
}

.odds-info {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
}

.odds {
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 12px;
}

.odds.yes {
    background: #4CAF50;
    color: white;
}

.odds.no {
    background: #f44336;
    color: white;
}

.end-time {
    font-size: 12px;
    color: #999;
    margin: 10px 0;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
    transition: color 0.3s ease;
}

.close:hover {
    color: #333;
}

.bet-details, .resolve-details {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.potential-winnings {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: center;
    font-weight: bold;
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.loading-overlay p {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 18px;
    font-weight: bold;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
}

.toast {
    background: white;
    color: #333;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border-left: 4px solid #667eea;
    animation: toastSlideIn 0.3s ease;
    max-width: 300px;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    border-left-color: #4CAF50;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

.toast.error {
    border-left-color: #f44336;
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
}

.toast.info {
    border-left-color: #2196F3;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    h1 {
        font-size: 2rem;
    }

    .section {
        padding: 15px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .predictions-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }

    table {
        font-size: 14px;
    }

    th, td {
        padding: 10px 8px;
    }

    .odds-info {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }

    .section {
        padding: 10px;
    }

    button {
        padding: 10px 20px;
        font-size: 14px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-card p {
        font-size: 1.5rem;
    }

    .prediction-card {
        padding: 15px;
    }

    .toast {
        max-width: 250px;
        font-size: 14px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* Focus States for Accessibility */
button:focus, input:focus, select:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .modal, .loading-overlay, .toast-container, button {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .section {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}