/* Cash App Clone - Main Stylesheet */
/* Mobile-first responsive design */

:root {
    --primary: #00D632;
    --primary-dark: #00b82b;
    --primary-light: #00e636;
    --bg-dark: #000000;
    --bg-card: #1a1a1a;
    --bg-card-light: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --danger: #ff3b30;
    --warning: #ff9500;
    --info: #007aff;
    --success: #34c759;
    --border: #333333;
    --shadow: rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Container */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    padding-bottom: 80px;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 16px;
    background: var(--bg-dark);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header h1 {
    font-size: 28px;
    font-weight: 700;
}

.header-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    color: var(--text-primary);
    font-size: 18px;
}

.header-icon:hover {
    background: var(--bg-card-light);
}

/* Back Button */
.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 16px;
    cursor: pointer;
    padding: 8px 0;
}

.back-btn svg {
    width: 24px;
    height: 24px;
}

/* Page Content */
.page-content {
    padding: 0 16px 20px;
}

/* Balance Card */
.balance-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
}

.balance-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.balance-amount {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 8px;
}

.balance-account {
    font-size: 12px;
    color: var(--text-muted);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.action-btn {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn.primary {
    background: var(--primary);
    color: #000;
}

.action-btn.primary:hover {
    background: var(--primary-dark);
}

.action-btn.secondary {
    background: var(--bg-card);
    color: var(--text-primary);
}

.action-btn.secondary:hover {
    background: var(--bg-card-light);
}

.action-btn.danger {
    background: var(--danger);
    color: #fff;
}

/* Section Title */
.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}

/* Explore Grid */
.explore-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.explore-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--text-primary);
}

.explore-card:hover {
    background: var(--bg-card-light);
    transform: translateY(-2px);
}

.explore-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 12px;
}

.explore-icon.green { background: var(--primary); color: #000; }
.explore-icon.blue { background: var(--info); color: #fff; }
.explore-icon.purple { background: #af52de; color: #fff; }
.explore-icon.orange { background: var(--warning); color: #fff; }

.explore-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.explore-card p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* List Item */
.list-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--text-primary);
}

.list-item:hover {
    background: var(--bg-card-light);
}

.list-item-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 20px;
}

.list-item-content {
    flex: 1;
}

.list-item-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.list-item-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
}

.list-item-arrow {
    color: var(--text-muted);
    font-size: 18px;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: var(--bg-dark);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-muted);
    transition: all 0.2s;
    border: none;
    background: none;
    font-size: 11px;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item-icon {
    font-size: 24px;
}

.nav-item-center {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -28px;
    box-shadow: 0 4px 12px rgba(0, 214, 50, 0.4);
    color: #000;
    font-size: 28px;
    font-weight: 700;
}

/* Cash Card */
.cash-card {
    background: linear-gradient(135deg, #00D632 0%, #00b82b 100%);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    min-height: 200px;
}

.cash-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.card-brand {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #000;
}

.card-chip {
    width: 40px;
    height: 30px;
    background: #ffd700;
    border-radius: 6px;
    margin-bottom: 20px;
}

.card-number {
    font-size: 20px;
    letter-spacing: 3px;
    margin-bottom: 20px;
    color: #000;
    font-family: monospace;
}

.card-details {
    display: flex;
    justify-content: space-between;
}

.card-detail-label {
    font-size: 10px;
    text-transform: uppercase;
    color: rgba(0,0,0,0.6);
    margin-bottom: 4px;
}

.card-detail-value {
    font-size: 14px;
    font-weight: 600;
    color: #000;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 50px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-card-light);
    border-radius: 28px;
    transition: 0.3s;
}

.toggle-slider:before {
    content: '';
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* Boost Card */
.boost-card {
    background: var(--bg-card);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.boost-icon {
    width: 44px;
    height: 44px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #000;
}

.boost-content {
    flex: 1;
}

.boost-title {
    font-size: 15px;
    font-weight: 600;
}

.boost-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
}

.boost-check {
    width: 24px;
    height: 24px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 14px;
}

/* Bitcoin Page */
.bitcoin-balance {
    text-align: center;
    padding: 20px 0;
}

.bitcoin-amount {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 8px;
}

.bitcoin-usd {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.bitcoin-price {
    font-size: 14px;
    color: var(--info);
}

.bitcoin-price .down {
    color: var(--danger);
}

/* Chart */
.chart-container {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    height: 200px;
    position: relative;
    overflow: hidden;
}

.chart-line {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    height: 120px;
}

.chart-svg {
    width: 100%;
    height: 100%;
}

/* Time Buttons */
.time-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    justify-content: center;
}

.time-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: none;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.time-btn.active {
    background: var(--bg-card-light);
    color: var(--text-primary);
}

/* Action Row */
.action-row {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.action-row .action-btn {
    flex: 1;
}

/* Stock Item */
.stock-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 12px;
    margin-bottom: 8px;
}

.stock-symbol {
    width: 44px;
    height: 44px;
    background: var(--bg-card-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    margin-right: 12px;
}

.stock-info {
    flex: 1;
}

.stock-name {
    font-size: 15px;
    font-weight: 600;
}

.stock-company {
    font-size: 13px;
    color: var(--text-secondary);
}

.stock-price {
    text-align: right;
}

.stock-price-value {
    font-size: 15px;
    font-weight: 600;
}

.stock-price-change {
    font-size: 13px;
    color: var(--success);
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}

.tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--primary);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-card);
    border-radius: 20px 20px 0 0;
    padding: 24px;
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-card-light);
    border: none;
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Form */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-card-light);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* Button */
.btn {
    padding: 14px 24px;
    border-radius: 12px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: #000;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-full {
    width: 100%;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-secondary {
    background: var(--bg-card-light);
    color: var(--text-primary);
}

/* Alert */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-warning {
    background: rgba(255, 149, 0, 0.1);
    border: 1px solid var(--warning);
    color: var(--warning);
}

.alert-success {
    background: rgba(52, 199, 89, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

.alert-danger {
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.alert-info {
    background: rgba(0, 122, 255, 0.1);
    border: 1px solid var(--info);
    color: var(--info);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state-text {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Transaction Item */
.transaction-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 12px;
    margin-bottom: 8px;
}

.transaction-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 18px;
    overflow: hidden;
}

.transaction-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.transaction-info {
    flex: 1;
}

.transaction-name {
    font-size: 15px;
    font-weight: 600;
}

.transaction-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.transaction-amount {
    font-size: 15px;
    font-weight: 600;
}

.transaction-amount.positive {
    color: var(--success);
}

.transaction-amount.negative {
    color: var(--danger);
}

/* Profile */
.profile-header {
    text-align: center;
    padding: 20px 0;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--bg-card);
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-edit {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #000;
}

.profile-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-username {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Keypad */
.keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

.keypad-btn {
    padding: 20px;
    background: var(--bg-dark);
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.1s;
}

.keypad-btn:hover {
    background: var(--bg-card);
}

.keypad-btn:active {
    background: var(--bg-card-light);
}

/* Spending Insights */
.insight-item {
    margin-bottom: 16px;
}

.insight-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.insight-category {
    font-size: 14px;
    font-weight: 500;
}

.insight-amount {
    font-size: 14px;
    font-weight: 600;
}

.insight-bar {
    height: 8px;
    background: var(--bg-card-light);
    border-radius: 4px;
    overflow: hidden;
}

.insight-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s;
}

/* Flash Message */
.flash-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 10px;
    z-index: 3000;
    font-size: 14px;
    font-weight: 500;
    animation: slideDown 0.3s ease;
    max-width: 90%;
}

@keyframes slideDown {
    from { transform: translate(-50%, -100%); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 24px;
    max-width: 480px;
    margin: 0 auto;
}

.auth-logo {
    text-align: center;
    margin-bottom: 40px;
}

.auth-logo h1 {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
}

.auth-form {
    margin-bottom: 20px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
}

.auth-link a {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Admin Panel */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 250px;
    background: var(--bg-card);
    padding: 20px;
    overflow-y: auto;
}

.admin-main {
    margin-left: 250px;
    padding: 20px;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 4px;
    transition: all 0.2s;
}

.admin-nav-item:hover,
.admin-nav-item.active {
    background: var(--bg-card-light);
    color: var(--text-primary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
}

/* Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: var(--bg-card-light);
    font-size: 13px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.data-table tr:hover {
    background: rgba(255,255,255,0.02);
}

/* Responsive */
@media (max-width: 768px) {
    .admin-sidebar {
        display: none;
    }
    .admin-main {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .balance-amount {
        font-size: 36px;
    }
    .bitcoin-amount {
        font-size: 32px;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-card-light);
    border-radius: 3px;
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Search */
.search-box {
    position: relative;
    margin-bottom: 20px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-box .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success { background: rgba(52,199,89,0.2); color: var(--success); }
.badge-warning { background: rgba(255,149,0,0.2); color: var(--warning); }
.badge-danger { background: rgba(255,59,48,0.2); color: var(--danger); }
.badge-info { background: rgba(0,122,255,0.2); color: var(--info); }

/* Method Selector */
.method-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.method-btn {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    border: 2px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.method-btn.active {
    border-color: var(--primary);
    background: rgba(0,214,50,0.1);
    color: var(--primary);
}

/* Bitcoin Address */
.btc-address-box {
    background: var(--bg-card-light);
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    word-break: break-all;
    font-family: monospace;
    font-size: 12px;
}

.copy-btn {
    padding: 6px 12px;
    background: var(--primary);
    color: #000;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    margin-left: 8px;
}