﻿:root {
    --primary-color: #0a2142; /* Navy Blue */
    --secondary-color: #1f8b31; /* Green */
    --orange-color: #df7b1f; /* Orange */
    --purple-color: #5c268b; /* Purple */
    --brown-color: #6c352b; /* Brown */
    --accent-color: #28a745;
    --accent-light-color: #f4faf1;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --danger-color: #dc3545;
    --gray-0: rgb(255, 255, 255);
    --gray-50: rgb(250, 250, 250);
    --gray-100: rgb(241, 241, 241);
    --gray-200: rgb(227, 227, 227);
    --gray-300: rgb(223, 223, 223);
    --gray-350: rgb(153, 153, 153);
    --gray-400: rgb(146, 146, 146);
    --gray-500: rgb(102, 102, 102);
    --gray-600: rgb(72, 72, 72);
    --gray-700: rgb(51, 51, 51);
    --gray-800: rgb(34, 34, 34);
    --gray-900: rgb(17, 17, 17);
    --gray-1000: rgb(0, 0, 0);
    --font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--primary-color);
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

.app-container {
    width: 100%;
    max-width: 480px; /* Mobile width */
    background-color: var(--bg-color);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

/* Screens */
.screen {
    display: none;
    grid-template-columns: 1fr;
    animation: fadeIn 0.3s ease;
    position: relative;
}

#screen2 {
    max-height: 100dvh;
    overflow-y: auto;
}

.screen.active {
    display: grid;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Headers */
.header-main {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem;
    text-align: center;
    height: 60px;
}

.header-nav {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 20px;
    display: grid;
    grid-template-columns: 21px 1fr 21px;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 0;
    z-index: 10;
    gap: 1rem;
}

    .header-nav .back-btn {
        color: white;
        background: none;
        border: none;
        font-size: 18px;
        cursor: pointer;
    }

    .header-nav h2 {
        font-size: 18px;
        font-weight: 600;
        margin: 0;
        text-align: center;
    }

    .header-nav .subtitle {
        font-size: 12px;
        color: #a0aec0;
        font-weight: normal;
        display: block;
        margin-top: 2px;
        text-align: center;
    }

/* Titles */
.section-title {
    padding: 20px;
    text-align: center;
}

    .section-title h2 {
        font-size: 2rem;
        font-weight: 700;
        margin-bottom: 5px;
    }

    .section-title p {
        font-size: 14px;
        color: var(--text-muted);
    }

/* Content Area */
.content-area {
    padding: 0 20px;
    flex: 1;
}

/* Category Cards */
.category-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: transform 0.2s;
    border: 1px solid var(--border-color);
}

    .category-card:active {
        transform: scale(0.98);
    }

.category-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 15px;
}

.text-primary {
    color: var(--primary-color);
}

.text-secondary {
    color: var(--secondary-color);
}

.text-orange {
    color: var(--orange-color);
}

.text-purple {
    color: var(--purple-color);
}

.text-brown {
    color: var(--brown-color);
}

.category-info {
    flex: 1;
}

    .category-info h3 {
        font-size: 16px;
        font-weight: 600;
        margin: 0 0 3px 0;
    }

    .category-info p {
        font-size: 13px;
        color: var(--secondary-color);
        margin: 0;
    }

.category-arrow {
    color: var(--text-muted);
    font-size: 14px;
}

/* Screen 2: Top Summary */
.top-summary {
    background: var(--accent-light-color);
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 68px;
    z-index: 9;
}

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

    .summary-header h3 {
        font-size: 16px;
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 0;
    }

    .summary-header .counter {
        font-size: 13px;
        color: var(--secondary-color);
        font-weight: 600;
    }

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

    .amount-input-group label {
        font-weight: 600;
    }

.amount-field {
    flex: 1;
    position: relative;
}

    .amount-field i {
        position: absolute;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-muted);
    }

    .amount-field input {
        width: 100%;
        padding: 10px 10px 10px 25px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        font-size: 16px;
        font-weight: 600;
    }

.quick-amounts {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 5px;
}

    .quick-amounts::-webkit-scrollbar {
        display: none;
    }

.btn-quick {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

    .btn-quick.active {
        background: var(--secondary-color);
        color: white;
        border-color: var(--secondary-color);
    }

/* Matches */
.matches-list {
    padding: 20px;
}

.match-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    position: relative;
}

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

.match-title {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.match-league {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
}

.match-date {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.match-index {
    background: rgba(31, 139, 49, 0.1);
    color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    aspect-ratio: 1 / 1;
}

.btn-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
}

.odds-container {
    display: flex;
    gap: 8px;
}

.odd-btn {
    flex: 1;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

    .odd-btn.active {
        background: var(--secondary-color);
        color: white;
        border-color: var(--secondary-color);
    }

.odd-name {
    font-size: 12px;
    margin-bottom: 4px;
}

.odd-value {
    font-size: 14px;
    font-weight: 700;
}

/* Floating Bottom Bar */
.bottom-bar {
    position: sticky;
    bottom: 0;
    width: 100%;
    max-width: 480px;
    background: var(--accent-light-color);
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 20;
}

.win-amount-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.win-label {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

    .win-label i {
        color: var(--text-muted);
        font-size: 14px;
    }

.win-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--secondary-color);
}

.btn-primary {
    width: 100%;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}

    .btn-primary:disabled {
        background: #a5d6b0;
        cursor: not-allowed;
    }

    .btn-primary:active:not(:disabled) {
        opacity: 0.9;
    }

.bottom-bar p.note {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 10px;
}

/* Screen 3: PICK Output */
.pick-info-alert {
    background: rgba(31, 139, 49, 0.1);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    gap: 10px;
    margin: 20px;
}

    .pick-info-alert i {
        color: var(--secondary-color);
        font-size: 18px;
    }

    .pick-info-alert p {
        font-size: 13px;
        margin: 0;
    }

.qr-container {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    margin: 0 20px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.qr-alert {
    font-weight: 600;
    text-align: center;
    color: var(--danger-color);
    display: none;
}

#qrcode {
    width: 100%;
    max-width: 250px;
    height: auto;
    aspect-ratio: 1;
}

    #qrcode img {
        width: 100%;
    }

.summary-box {
    background: white;
    border-radius: 12px;
    padding: 15px 20px;
    margin: 0 20px 20px;
    border: 1px solid var(--border-color);
    display: grid;
    gap: 0.5rem;
}

    .summary-box h4 {
        font-size: 1rem;
        font-weight: 800;
    }

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.summary-row {
    margin-bottom: 0;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border-color);
    font-size: 16px;
    font-weight: 700;
}

    .summary-row .label {
        color: var(--gray-500);
        font-weight: 500;
        font-size: 0.9rem;
    }

    .summary-row .value {
        font-weight: 700;
        font-size: 1.1rem;
    }

    .summary-row:last-child span:last-child {
        color: var(--secondary-color);
    }

.actions-container {
    padding: 0 20px;
    margin-bottom: 20px;
}

.btn-save {
    width: 100%;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.btn-another-bet {
    width: 100%;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.another-bet-container {
    margin: 0 1rem;
}

.capture-hint {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: white;
    font-size: 14px;
    font-weight: 600;
}

.disclaimers {
    padding: 20px;
    border-top: 1px dashed var(--border-color);
}

.disclaimer-item {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.disclaimer-icon {
    width: 45px;
    height: 45px;
    padding: 0.35rem;
    border-radius: 0.5rem;
    background: rgba(31, 139, 49, 0.1);
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.disclaimer-item p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
}

    .disclaimer-item p strong {
        color: var(--text-dark);
        display: block;
        margin-bottom: 2px;
    }

/* Modals / Bottom Sheets */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

    .modal-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

.bottom-sheet {
    background: white;
    width: 100%;
    max-width: 480px;
    border-radius: 20px 20px 0 0;
    padding: 25px 20px;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .bottom-sheet {
    transform: translateY(0);
}

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

    .sheet-header h3 {
        font-size: 18px;
        margin: 0;
    }

.btn-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-muted);
}

.steps-list {
    list-style: none;
    margin-bottom: 20px;
}

    .steps-list li {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 12px;
        font-size: 14px;
        font-weight: 500;
    }

.step-number {
    background: var(--secondary-color);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Helpers */
.whatsapp-contact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    text-decoration: none;
    color: var(--text-dark);
}

.wa-icon {
    color: #25d366;
    font-size: 32px;
}

.wa-info h4 {
    margin: 0 0 2px 0;
    font-size: 14px;
}

.wa-info p {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
}

.dudas-link {
    display: block;
    text-align: center;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 14px;
    margin: 20px 0;
    text-decoration: none;
}

    .dudas-link i {
        margin-left: 5px;
    }

/* Warnings */
.warning-box {
    background: #fff3cd;
    border: 1px solid #ffe69c;
    color: #664d03;
    padding: 12px;
    border-radius: 8px;
    margin: 15px 20px;
    font-size: 13px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

    .warning-box i {
        color: #ffc107;
        font-size: 18px;
        margin-top: 2px;
    }

/* Centered Modals */
.modal-center {
    align-items: center;
}

.modal-card {
    background: white;
    width: 90%;
    max-width: 320px;
    border-radius: 16px;
    padding: 25px 20px;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-card-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

    .modal-card-icon.warning {
        color: #ffc107;
    }

    .modal-card-icon.info {
        color: var(--secondary-color);
    }

.modal-card p {
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 25px;
    color: var(--text-dark);
}

.modal-actions {
    display: flex;
    gap: 10px;
}

.btn-modal {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: opacity 0.2s;
}

    .btn-modal:active {
        opacity: 0.8;
    }

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

.btn-modal-secondary {
    background: var(--bg-color);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.cursor-pointer {
    cursor: pointer;
}
