* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.app-container {
    max-width: 500px;
    margin: 0 auto;
    background: #f8f9fa;
    min-height: 100vh;
    padding-bottom: 70px;
    position: relative;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.logo-area h1 {
    font-size: 18px;
    font-weight: 600;
}

.header-actions button {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    margin-left: 8px;
    cursor: pointer;
}

.back-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

/* Balance Card */
.balance-card {
    background: white;
    margin: 20px;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.balance-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.balance-item {
    text-align: center;
    flex: 1;
}

.balance-item .label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.balance-item .value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
}

.balance-actions {
    display: flex;
    gap: 10px;
}

.balance-actions a {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.btn-add {
    background: #4caf50;
    color: white;
}

.btn-withdraw {
    background: #ff9800;
    color: white;
}

.btn-transfer {
    background: #2196f3;
    color: white;
}

/* Stats Card */
.stats-card {
    background: white;
    margin: 20px;
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.stat {
    text-align: center;
}

.stat i {
    font-size: 24px;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.stat-label {
    display: block;
    font-size: 11px;
    color: #666;
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 0 20px;
    margin-bottom: 20px;
}

.menu-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-decoration: none;
    text-align: center;
    transition: transform 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.menu-item:hover {
    transform: translateY(-3px);
}

.menu-item i {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 10px;
    display: block;
}

.menu-item span {
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.menu-item.logout i {
    color: #f44336;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 500px;
    margin: 0 auto;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 100;
}

.nav-item {
    text-align: center;
    text-decoration: none;
    color: #999;
    transition: color 0.3s;
}

.nav-item i {
    font-size: 24px;
    display: block;
}

.nav-item span {
    font-size: 12px;
}

.nav-item.active {
    color: #667eea;
}

/* Auth Pages */
.auth-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.auth-container {
    max-width: 400px;
    width: 90%;
    background: white;
    border-radius: 20px;
    padding: 30px 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
}

.auth-header h1 {
    font-size: 24px;
    color: #333;
}

.auth-header p {
    color: #666;
    font-size: 14px;
}

.auth-form .form-group {
    margin-bottom: 20px;
    position: relative;
}

.auth-form .form-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.auth-form input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.auth-form input:focus {
    outline: none;
    border-color: #667eea;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 13px;
}

.checkbox {
    cursor: pointer;
}

.forgot-link {
    color: #667eea;
    text-decoration: none;
}

.btn-login, .btn-register {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-login:hover, .btn-register:hover {
    transform: translateY(-2px);
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 13px;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

/* Alert Messages */
.alert {
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #c62828;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #2e7d32;
}

/* Wallet Page */
.wallet-overview {
    padding: 20px;
}

.balance-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 20px;
}

.balance-box .label {
    display: block;
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.balance-box .amount {
    display: block;
    font-size: 36px;
    font-weight: bold;
    margin: 10px 0;
}

.view-transactions {
    color: white;
    text-decoration: none;
    font-size: 12px;
    opacity: 0.8;
}

.balance-detail {
    background: white;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.detail-item:last-child {
    border-bottom: none;
}

.btn-small {
    background: #667eea;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
}

.help-section {
    padding: 0 20px;
}

.help-section h3 {
    font-size: 14px;
    color: #666;
    margin: 15px 0 5px;
}

.help-link {
    display: block;
    color: #667eea;
    text-decoration: none;
    font-size: 13px;
    margin-bottom: 15px;
}

.contact-support {
    background: #fff3e0;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    margin-top: 20px;
}

.contact-link {
    display: inline-block;
    background: #ff9800;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    margin-top: 10px;
}

/* Matches Page */
.matches-header {
    padding: 15px 20px;
    background: white;
    border-bottom: 1px solid #eee;
}

.matches-list {
    padding: 15px;
}

.match-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.match-title {
    font-weight: bold;
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.match-time {
    font-size: 12px;
    color: #999;
    margin-bottom: 12px;
}

.match-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.detail span {
    display: block;
    font-size: 11px;
    color: #999;
}

.detail strong {
    font-size: 14px;
    color: #333;
}

.match-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.players-count {
    font-size: 13px;
    color: #666;
}

.join-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 6px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
}

/* Leaderboard */
.leaderboard {
    background: white;
    margin: 20px;
    border-radius: 15px;
    overflow: hidden;
}

.leaderboard-header {
    display: grid;
    grid-template-columns: 80px 1fr 100px;
    background: #667eea;
    color: white;
    padding: 12px 15px;
    font-weight: 600;
    font-size: 14px;
}

.leaderboard-item {
    display: grid;
    grid-template-columns: 80px 1fr 100px;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    transition: background 0.3s;
}

.leaderboard-item:hover {
    background: #f5f5f5;
}

.leaderboard-item.top-1 {
    background: linear-gradient(135deg, #ffd70020 0%, #ffed4e20 100%);
}

.leaderboard-item.top-2 {
    background: linear-gradient(135deg, #c0c0c020 0%, #e0e0e020 100%);
}

.leaderboard-item.top-3 {
    background: linear-gradient(135deg, #cd7f3220 0%, #ffa04e20 100%);
}

.rank {
    font-weight: bold;
    color: #667eea;
}

.name {
    font-weight: 500;
}

.winning {
    color: #4caf50;
    font-weight: bold;
}

/* Profile Page */
.profile-card {
    background: white;
    margin: 20px;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
}

.profile-avatar i {
    font-size: 80px;
    color: #667eea;
    margin-bottom: 15px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.info-row label {
    color: #666;
    font-weight: 500;
}

.edit-btn, .copy-btn {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    padding: 5px;
}

.profile-stats {
    background: white;
    margin: 20px;
    padding: 15px;
    border-radius: 15px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.password-change {
    background: white;
    margin: 20px;
    padding: 20px;
    border-radius: 15px;
}

.password-change h3 {
    margin-bottom: 15px;
}

.password-change input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.btn-change {
    width: 100%;
    padding: 10px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.profile-links {
    display: flex;
    justify-content: space-around;
    margin: 20px;
}

.profile-link {
    color: #667eea;
    text-decoration: none;
}

/* Transactions */
.transactions-filter {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: white;
}

.filter-btn {
    padding: 6px 20px;
    background: #f0f0f0;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active {
    background: #667eea;
    color: white;
}

.transactions-list {
    padding: 15px;
}

.transaction-item {
    background: white;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.transaction-icon i {
    font-size: 24px;
    color: #667eea;
}

.transaction-details {
    flex: 1;
}

.transaction-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.transaction-id {
    font-size: 10px;
    color: #999;
    margin-left: 8px;
}

.transaction-meta {
    font-size: 11px;
    color: #999;
}

.transaction-amount {
    font-weight: bold;
}

.transaction-amount.positive {
    color: #4caf50;
}

.transaction-amount.negative {
    color: #f44336;
}

.transaction-status {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
}

.status-pending {
    background: #fff3e0;
    color: #ff9800;
}

.status-completed {
    background: #e8f5e9;
    color: #4caf50;
}

/* Refer Page */
.refer-container {
    padding: 20px;
}

.refer-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.refer-code-box {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.code-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f5f5f5;
    padding: 12px;
    border-radius: 10px;
    margin-top: 10px;
}

.code-display span {
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 2px;
}

.copy-code-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
}

.how-it-works {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.steps {
    margin-top: 15px;
}

.step {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.step i {
    width: 40px;
    height: 40px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
}

.share-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
}

/* FAQ Page */
.faq-container {
    padding: 20px;
}

.faq-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}

.faq-question {
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 500;
}

.faq-question i:first-child {
    color: #667eea;
}

.faq-question i:last-child {
    margin-left: auto;
    transition: transform 0.3s;
}

.faq-item.active .faq-question i:last-child {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 15px;
    background: #f9f9f9;
    font-size: 14px;
    line-height: 1.6;
}

.faq-item.active .faq-answer {
    padding: 15px;
    max-height: 300px;
}

/* Contact Page */
.contact-container {
    padding: 20px;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.contact-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.contact-card i {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 10px;
}

.contact-card h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.contact-card p {
    font-size: 12px;
    color: #666;
}

.emergency-support {
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.emergency-support h3 {
    margin-bottom: 10px;
    color: #f44336;
}

.emergency-btn {
    display: inline-block;
    margin: 10px;
    padding: 10px 20px;
    background: #4caf50;
    color: white;
    text-decoration: none;
    border-radius: 8px;
}

.emergency-btn.whatsapp {
    background: #25d366;
}

/* Add Money / Withdraw Forms */
.add-money-container, .withdraw-container {
    padding: 20px;
}

.payment-methods {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.method-card {
    flex: 1;
    background: white;
    padding: 15px;
    text-align: center;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.method-card.selected {
    border-color: #667eea;
    background: #f0f0ff;
}

.method-card i {
    font-size: 32px;
    color: #667eea;
    display: block;
    margin-bottom: 8px;
}

.add-money-form, .withdraw-form {
    background: white;
    padding: 20px;
    border-radius: 12px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.btn-submit {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
}

.payment-info, .info-text {
    background: #fff3e0;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    font-size: 13px;
}

.payment-info h4 {
    margin-bottom: 10px;
    color: #ff9800;
}

/* Joined Matches */
.joined-matches-list {
    padding: 15px;
}

.joined-match-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.match-header h3 {
    font-size: 16px;
    color: #333;
}

.match-time {
    font-size: 11px;
    color: #999;
}

.match-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.play-btn {
    width: 100%;
    padding: 10px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 25px;
    border-radius: 15px;
    width: 90%;
    max-width: 320px;
    text-align: center;
}

.modal-input {
    width: 100%;
    padding: 10px;
    margin: 15px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.modal-btn {
    padding: 10px 20px;
    margin: 5px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.modal-btn.cancel {
    background: #999;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 50px 20px;
}

.empty-state i {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state p {
    color: #999;
    margin-bottom: 20px;
}

.btn-primary {
    display: inline-block;
    padding: 10px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
}

/* Responsive */
@media (max-width: 480px) {
    .menu-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .balance-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .balance-actions {
        flex-direction: column;
    }
}