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

:root {
    /* Monopoly Game Color Palette */
    --bg-main: #3D3D3D;
    --primary-orange: #FFA81C;
    --bg-card: #FCE9B1;
    --border-gold: #D98E32;
    --accent-magenta: #BE1652;
    --success-green: #2EA07B;

    /* Base Text Colors */
    --text-dark: #333333;
    --text-muted: #555555;
    --text-light: #FFFFFF;

    --radius: 20px;
    --radius-sm: 12px;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-light);
    min-height: 100vh;
    padding: 40px 20px 60px;
}

.container { max-width: 1100px; margin: 0 auto; position: relative; z-index: 1; }

.header { text-align: center; margin-bottom: 48px; }

.header .badge {
    display: inline-block;
    background: var(--primary-orange);
    color: var(--text-light);
    border-radius: 50px;
    padding: 6px 18px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.header h1 {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 900;
    color: var(--primary-orange);
    line-height: 1.2;
    margin-bottom: 12px;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.3);
}

.header p { color: #E0E0E0; font-size: 16px; font-weight: 600; }

.alert {
    border-radius: var(--radius-sm);
    padding: 14px 20px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success { background: var(--success-green); color: var(--text-light); }
.alert-error   { background: var(--accent-magenta); color: var(--text-light); }

.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
}

.step { display: flex; flex-direction: column; align-items: center; gap: 6px; }

.step-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid var(--border-gold);
    background: #EED79B;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 900;
    color: var(--text-dark);
    transition: all 0.3s;
}

.step.active .step-circle { border-color: var(--text-light); background: var(--primary-orange); color: var(--text-light); }
.step.done   .step-circle { border-color: var(--text-light); background: var(--success-green); color: var(--text-light); }

.step-label { font-size: 13px; color: #CCCCCC; font-weight: 700; white-space: nowrap; }
.step.active .step-label { color: var(--primary-orange); }
.step.done   .step-label { color: var(--success-green); }

.step-line {
    width: 80px;
    height: 4px;
    background: var(--border-gold);
    margin-bottom: 24px;
    transition: background 0.3s;
}

.step-line.done { background: var(--success-green); }

.card {
    background: var(--bg-card);
    border: 4px solid var(--border-gold);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 28px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.card h2 {
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent-magenta);
}

.search-row { display: flex; gap: 12px; flex-wrap: wrap; }

.search-row input {
    flex: 1;
    min-width: 200px;
    background: #FFFFFF;
    border: 2px solid var(--border-gold);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    color: var(--text-dark);
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.2s;
    outline: none;
}

.search-row input:focus { border-color: var(--accent-magenta); }
.search-row input::placeholder { color: #A0A0A0; }

.btn-search {
    background: var(--primary-orange);
    color: var(--text-light);
    border: none;
    border-radius: var(--radius-sm);
    padding: 14px 32px;
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    box-shadow: 0 4px 0px #C67B0B;
}

.btn-search:hover  { transform: translateY(-2px); box-shadow: 0 6px 0px #C67B0B; }
.btn-search:active { transform: translateY(2px); box-shadow: none; }
.btn-search:disabled { opacity: 0.6; cursor: not-allowed; }

.user-card {
    margin-top: 20px;
    background: #F3DB99;
    border: 2px solid var(--border-gold);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.user-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-magenta);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 900;
    flex-shrink: 0;
    color: var(--text-light);
}

.user-details { flex: 1; color: var(--text-dark); }
.user-name  { font-size: 18px; font-weight: 900; margin-bottom: 4px; }
.user-email { font-size: 14px; color: var(--text-muted); font-weight: 600; }

.user-balances { display: flex; gap: 12px; flex-wrap: wrap; }

.balance-pill {
    background: #FFFFFF;
    border: 2px solid var(--border-gold);
    border-radius: 50px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 900;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 6px;
}

.tab-group {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: #EED79B;
    border-radius: var(--radius-sm);
    padding: 6px;
    width: fit-content;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-dark);
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active { background: var(--accent-magenta); color: var(--text-light); }

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

.product-card {
    background: #FFFFFF;
    border: 3px solid var(--border-gold);
    border-radius: var(--radius);
    padding: 22px 18px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.product-card:hover { transform: translateY(-4px); box-shadow: 0 8px 16px rgba(0,0,0,0.1); }
.product-card.selected { border-color: var(--accent-magenta); background: #FFF9E6; }

.product-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    background: #FFF3D1;
    border: 2px solid var(--border-gold);
}

.product-amount { font-size: 22px; font-weight: 900; margin-bottom: 4px; color: var(--text-dark); }
.product-label { font-size: 14px; color: var(--text-muted); margin-bottom: 12px; font-weight: 700; }
.product-price { font-size: 16px; font-weight: 900; color: var(--accent-magenta); }
.product-price small { font-size: 12px; color: var(--text-muted); font-weight: 700; }

.selected-check {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-magenta);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-light);
    font-weight: 900;
}

.product-card.selected .selected-check { display: flex; }

.selected-summary {
    background: #EED79B;
    border: 2px solid var(--border-gold);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 15px;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--text-dark);
}

.pkg-name  { font-weight: 900; font-size: 17px; color: var(--accent-magenta); }
.pkg-price { color: var(--success-green); font-weight: 900; font-size: 18px; }

.pay-notice {
    background: #EED79B;
    border: 1px dashed var(--border-gold);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 700;
    margin-bottom: 24px;
    text-align: center;
}

.btn-pay {
    width: 100%;
    background: var(--success-green);
    color: var(--text-light);
    border: none;
    border-radius: var(--radius-sm);
    padding: 16px;
    font-family: 'Cairo', sans-serif;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 5px 0px #1E6B52;
}

.btn-pay:hover   { transform: translateY(-2px); box-shadow: 0 7px 0px #1E6B52; }
.btn-pay:active  { transform: translateY(2px); box-shadow: none; }
.btn-pay:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

.spinner {
    width: 18px; height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--text-light);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 600px) {
    .steps { flex-wrap: wrap; gap: 10px; }
    .step-line { display: none; }
    .search-row input { min-width: 100%; }
    .btn-search { width: 100%; }
}
