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

:root {
    --primary-color: #4CAF50;
    --primary-dark: #388E3C;
    --secondary-color: #2196F3;
    --danger-color: #f44336;
    --warning-color: #FF9800;
    --success-color: #4CAF50;
    --pending-color: #FFC107;
    --void-color: #9E9E9E;
    --text-dark: #212121;
    --text-light: #757575;
    --bg-light: #f5f5f5;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
    font-size: 16px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
}

/* Header */
.site-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    color: var(--text-dark);
}

.main-nav {
    display: flex;
    gap: 15px;
    align-items: center;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-dark);
    padding: 8px 16px;
    border-radius: 6px;
    transition: background 0.2s;
}

.main-nav a:hover {
    background: var(--bg-light);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: row;
        position: relative;
    }

    .hamburger {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 64px;
        right: -100%;
        width: 250px;
        height: calc(100vh - 64px);
        background: var(--bg-white);
        flex-direction: column;
        gap: 0;
        align-items: stretch;
        padding: 20px 0;
        box-shadow: var(--shadow-lg);
        transition: right 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
    }

    .main-nav.active {
        right: 0;
    }

    .main-nav a {
        padding: 15px 20px;
        border-radius: 0;
        border-bottom: 1px solid var(--border-color);
    }

    .main-nav a:hover {
        background: var(--bg-light);
    }

    .main-nav .btn {
        margin: 10px 20px;
        width: calc(100% - 40px);
        text-align: center;
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.5;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: #607D8B;
    color: white;
}

.btn-secondary:hover {
    background: #455A64;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #D32F2F;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: var(--primary-dark);
}

.btn-google {
    background: white;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-google:hover {
    background: var(--bg-light);
}

.btn-large {
    padding: 16px 32px;
    font-size: 18px;
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: border-color 0.3s;
}

/* Input with prefix (e.g., dollar sign) */
.input-with-prefix {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: white;
    transition: border-color 0.3s;
    width: 100%;
}

.input-with-prefix:focus-within {
    border-color: var(--primary-color);
    outline: 0;
}

.input-prefix {
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    background: #f5f5f5;
    border-right: 1px solid var(--border-color);
    white-space: nowrap;
}

.input-with-prefix input {
    border: none !important;
    flex: 1;
    padding: 12px !important;
    font-size: 16px !important;
    width: auto !important;
    min-width: 0;
    background: transparent;
}

.input-with-prefix input:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    font-family: inherit;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--text-light);
    font-size: 14px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
    }
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.radio-label:hover {
    border-color: var(--primary-color);
    background: var(--bg-light);
}

.radio-label input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Login Box */
.login-box {
    max-width: 450px;
    margin: 50px auto;
    padding: 40px;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 32px;
}

.login-box .subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 30px;
}

.login-form {
    margin: 20px 0;
}

.divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    background: var(--bg-white);
    padding: 0 15px;
    position: relative;
    color: var(--text-light);
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-error {
    background: #FFEBEE;
    color: #C62828;
    border-left: 4px solid var(--danger-color);
}

.alert-success {
    background: #E8F5E9;
    color: #2E7D32;
    border-left: 4px solid var(--success-color);
}

/* Dashboard */
.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-header h1 {
    font-size: 32px;
    color: var(--text-dark);
}

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

.stat-card {
    background: var(--bg-white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    border-top: 4px solid var(--primary-color);
}

.stat-card.stat-pending {
    border-top-color: var(--pending-color);
}

.stat-card.stat-won {
    border-top-color: var(--success-color);
}

.stat-card.stat-lost {
    border-top-color: var(--danger-color);
}

.stat-number {
    font-size: 48px;
    font-weight: bold;
    color: var(--text-dark);
}

.stat-label {
    font-size: 16px;
    color: var(--text-light);
    margin-top: 5px;
}

/* Action Buttons */
.action-buttons {
    margin: 30px 0;
    text-align: center;
}

/* Bets Section */
.bets-section {
    margin: 40px 0;
}

.bets-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.bets-list {
    display: grid;
    gap: 15px;
}

.bet-card {
    background: var(--bg-white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.bet-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.bet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.bet-date {
    color: var(--text-light);
    font-size: 14px;
}

.bet-description {
    font-size: 18px;
    color: var(--text-dark);
    margin: 15px 0;
    line-height: 1.5;
}

.bet-resolution {
    color: var(--text-light);
    font-size: 14px;
    margin: 10px 0;
}

.bet-meta {
    display: flex;
    gap: 15px;
    margin: 10px 0;
    font-size: 14px;
    color: var(--text-light);
}

.bet-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.badge-monetary {
    background: #E8F5E9;
    color: #2E7D32;
}

.badge-non_monetary {
    background: #E3F2FD;
    color: #1565C0;
}

.badge-status-pending {
    background: #FFF3E0;
    color: #E65100;
}

.badge-status-won {
    background: #E8F5E9;
    color: #2E7D32;
}

.badge-status-lost {
    background: #FFEBEE;
    color: #C62828;
}

.badge-status-void {
    background: #F5F5F5;
    color: #616161;
}

.badge-success {
    background: var(--success-color);
    color: white;
}

/* Bet Detail */
.bet-detail {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin: 20px 0;
}

.bet-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.bet-detail-description {
    font-size: 28px;
    margin: 20px 0;
    color: var(--text-dark);
    line-height: 1.4;
}

.bet-info {
    margin: 30px 0;
}

.info-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid var(--bg-light);
}

.info-label {
    font-weight: 500;
    color: var(--text-light);
    min-width: 150px;
}

.info-value {
    color: var(--text-dark);
}

.outcome-box {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid var(--primary-color);
}

.outcome-box h3 {
    margin-bottom: 10px;
    color: var(--text-dark);
}

.action-section {
    margin: 30px 0;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 8px;
}

.action-section h3 {
    margin-bottom: 15px;
}

.status-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.bet-actions-footer {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .bet-detail {
        padding: 20px;
    }

    .bet-detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .bet-actions-footer,
    .status-buttons {
        flex-direction: column;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state p {
    font-size: 18px;
    margin-bottom: 20px;
}

/* Page Header */
.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 32px;
    color: var(--text-dark);
}

/* Stats Summary */
.stats-summary {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin: 20px 0;
    padding: 20px;
    background: var(--bg-white);
    border-radius: 8px;
}

.stat-item {
    flex: 1;
    min-width: 100px;
    text-align: center;
}

.stat-item strong {
    display: block;
    font-size: 24px;
    color: var(--text-dark);
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 10px 20px;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s;
}

.filter-tab:hover {
    border-color: var(--primary-color);
    background: var(--bg-light);
}

.filter-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Share Box */
.share-box {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin: 20px 0;
}

.bet-preview {
    padding: 20px;
    background: var(--bg-light);
    border-radius: 8px;
    margin-bottom: 30px;
}

.bet-preview h3 {
    margin-bottom: 10px;
}

.share-link-section {
    margin: 30px 0;
}

.share-link-section label {
    display: block;
    font-weight: 500;
    margin-bottom: 10px;
}

.input-group {
    display: flex;
    gap: 10px;
}

.input-group input {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
}

.help-text {
    margin-top: 8px;
    font-size: 14px;
    color: var(--text-light);
}

.share-methods {
    margin: 30px 0;
}

.share-methods h3 {
    margin-bottom: 15px;
}

.share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Shared Bet View */
.shared-bet-view {
    max-width: 800px;
    margin: 0 auto;
}

.share-banner {
    background: var(--secondary-color);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.cta-box {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    margin: 20px 0;
}

.cta-box h3 {
    margin-bottom: 10px;
}

.cta-box p {
    color: var(--text-light);
    margin-bottom: 20px;
}

/* Voice Button */
.btn-voice {
    margin-top: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.btn-voice:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-voice:active {
    transform: translateY(0);
}

.btn-voice.recording {
    background-color: #f44336 !important;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(244, 67, 54, 0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .input-group {
        flex-direction: column;
    }

    .share-buttons {
        flex-direction: column;
    }
}

/* Participants Section */
.participants-section {
    background: white;
    padding: 24px;
    border-radius: 12px;
    margin-top: 24px;
    border: 1px solid var(--border-color);
}

.participants-section h3 {
    margin: 0 0 16px 0;
    color: var(--text-primary);
    font-size: 18px;
}

.participants-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.participant-card {
    background: var(--background);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.participant-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.participant-info strong {
    font-size: 16px;
    color: var(--text-primary);
}

.participant-contact {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
    color: var(--text-secondary);
}

.participant-contact span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Select dropdown styling */
select {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.3s;
}

select:focus {
    outline: none;
    border-color: var(--primary-color);
}

select:hover {
    border-color: #999;
}

/* Utilities */
.text-center {
    text-align: center;
}

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

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