/* ===== MOBILE VARIABLES & RESET ===== */
:root {
    /* Dark Theme Colors */
    --primary: #0d1b2a;
    --secondary: #1b263b;
    --accent: #e63946;
    --safe: #2a9d8f;
    --warning: #e9c46a;
    --light: #f8f9fa;
    --dark: #0a0f1c;
    --gray: #8d99ae;
    --card-bg: rgba(255, 255, 255, 0.05);
    --border-radius: 16px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s ease;
    
    /* Mobile Specific */
    --header-height: 60px;
    --bottom-nav-height: 65px;
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

.light-theme {
    --primary: #f8f9fa;
    --secondary: #ffffff;
    --light: #0d1b2a;
    --dark: #f8f9fa;
    --gray: #495057;
    --card-bg: rgba(13, 27, 42, 0.05);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--primary);
    color: var(--light);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
    padding-top: var(--header-height);
    padding-bottom: calc(var(--bottom-nav-height) + var(--safe-area-bottom));
}

/* ===== MOBILE HEADER ===== */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--secondary);
    box-shadow: var(--shadow);
    z-index: 100;
    padding: 10px 20px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-left i {
    font-size: 1.8rem;
    color: var(--accent);
}

.header-left h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    background: linear-gradient(to right, var(--accent), var(--warning));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.header-subtitle {
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: -5px;
}

.theme-toggle {
    background: var(--card-bg);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--warning);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle:active {
    transform: scale(0.9);
}

/* ===== BOTTOM NAVIGATION ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--bottom-nav-height) + var(--safe-area-bottom));
    background: var(--secondary);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: var(--safe-area-bottom);
    z-index: 100;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 8px;
    transition: var(--transition);
    position: relative;
}

.nav-item i {
    font-size: 1.5rem;
}

.nav-item span {
    font-size: 0.7rem;
    font-weight: 500;
}

.nav-item.active {
    color: var(--accent);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--accent);
    border-radius: 0 0 3px 3px;
}

/* ===== MAIN CONTENT ===== */
.mobile-content {
    min-height: calc(100vh - var(--header-height) - var(--bottom-nav-height) - var(--safe-area-bottom));
}

.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

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

.page-inner {
    padding: 15px;
}

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

.page-header h2 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ===== QUICK ACTIONS ===== */
.quick-actions-mobile {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.quick-btn-mobile {
    background: var(--card-bg);
    border: 2px solid rgba(42, 157, 143, 0.3);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--safe);
    cursor: pointer;
    transition: var(--transition);
}

.quick-btn-mobile.danger {
    border-color: rgba(233, 196, 106, 0.3);
    color: var(--warning);
}

.quick-btn-mobile i {
    font-size: 1.5rem;
}

.quick-btn-mobile span {
    font-size: 0.85rem;
    font-weight: 500;
}

.quick-btn-mobile:active {
    transform: scale(0.95);
}

/* ===== MOBILE CARDS ===== */
.mobile-card {
    background: var(--secondary);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.card-header i {
    color: var(--warning);
    font-size: 1.2rem;
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--light);
}

/* ===== MOBILE SELECT ===== */
.mobile-select {
    width: 100%;
    padding: 15px;
    background: var(--card-bg);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--light);
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23e9c46a' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    cursor: pointer;
}

.mobile-select:focus {
    outline: none;
    border-color: var(--accent);
}

.mobile-select option {
    background: var(--secondary);
    color: var(--light);
}

/* ===== AMOUNT DISPLAY ===== */
.amount-display-mobile {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.1), rgba(233, 196, 106, 0.1));
    border-radius: 12px;
    margin-bottom: 15px;
}

.currency {
    font-size: 1.2rem;
    color: var(--warning);
    font-weight: 600;
}

.amount-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--light);
    font-family: 'Orbitron', sans-serif;
    margin-left: 5px;
}

/* ===== MOBILE SLIDER ===== */
.mobile-slider {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    outline: none;
    margin: 10px 0;
}

.mobile-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(230, 57, 70, 0.7);
    border: 3px solid var(--light);
}

.mobile-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(230, 57, 70, 0.7);
    border: 3px solid var(--light);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--gray);
}

/* ===== ANALYZE BUTTON ===== */
.analyze-btn-mobile {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--accent), #c1121f);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.4);
    transition: var(--transition);
    margin-bottom: 20px;
}

.analyze-btn-mobile:active {
    transform: scale(0.98);
}

/* ===== RESULT SECTION ===== */
.result-section {
    margin-top: 20px;
}

.result-status {
    background: var(--secondary);
    border-radius: var(--border-radius);
    padding: 30px 20px;
    text-align: center;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
}

.status-icon-mobile {
    font-size: 4rem;
    margin-bottom: 15px;
}

.status-icon-mobile.fraud {
    color: var(--accent);
    animation: pulse 2s infinite;
}

.status-icon-mobile.safe {
    color: var(--safe);
}

.status-icon-mobile.warning {
    color: var(--warning);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.status-text-mobile {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 10px;
}

.status-text-mobile.fraud {
    color: var(--accent);
}

.status-text-mobile.safe {
    color: var(--safe);
}

.status-text-mobile.warning {
    color: var(--warning);
}

.status-subtitle {
    color: var(--gray);
    font-size: 0.9rem;
}

/* ===== CONFIDENCE SECTION ===== */
.confidence-section {
    background: var(--secondary);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
}

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

.confidence-percent {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--warning);
    font-family: 'Orbitron', sans-serif;
}

.confidence-bar {
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--safe) 0%, var(--warning) 50%, var(--accent) 100%);
    transition: width 1s ease;
}

/* ===== RISK SECTION ===== */
.risk-section {
    background: var(--secondary);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
}

.risk-section h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 1rem;
}

.risk-list {
    list-style: none;
    padding: 0;
}

.risk-list li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
}

.risk-list li:last-child {
    border-bottom: none;
}

.risk-list li i {
    color: var(--warning);
    margin-top: 2px;
}

/* ===== RECOMMENDATION SECTION ===== */
.recommendation-section {
    background: var(--secondary);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.recommendation-section h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 1rem;
}

.recommendation-section p {
    color: var(--gray);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ===== FILTER CHIPS ===== */
.filter-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 20px;
    -webkit-overflow-scrolling: touch;
}

.filter-chips::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    padding: 8px 16px;
    background: var(--card-bg);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: var(--light);
    font-size: 0.85rem;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
}

.filter-chip.active {
    background: var(--accent);
    border-color: var(--accent);
}

.filter-chip:active {
    transform: scale(0.95);
}

/* ===== HISTORY LIST ===== */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    background: var(--secondary);
    border-radius: var(--border-radius);
    padding: 15px;
    border-left: 4px solid var(--accent);
    box-shadow: var(--shadow);
}

.history-item.safe {
    border-left-color: var(--safe);
}

.history-item.warning {
    border-left-color: var(--warning);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.history-location {
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-time {
    font-size: 0.75rem;
    color: var(--gray);
}

.history-amount {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 10px;
}

.history-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 10px;
}

.history-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.75rem;
}

.history-status.fraud {
    background: rgba(230, 57, 70, 0.2);
    color: var(--accent);
}

.history-status.safe {
    background: rgba(42, 157, 143, 0.2);
    color: var(--safe);
}

.history-status.warning {
    background: rgba(233, 196, 106, 0.2);
    color: var(--warning);
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.stat-card-mobile {
    background: var(--secondary);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-icon-mobile {
    width: 50px;
    height: 50px;
    margin: 0 auto 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card-mobile.safe .stat-icon-mobile {
    background: rgba(42, 157, 143, 0.2);
    color: var(--safe);
}

.stat-card-mobile.warning .stat-icon-mobile {
    background: rgba(233, 196, 106, 0.2);
    color: var(--warning);
}

.stat-card-mobile.fraud .stat-icon-mobile {
    background: rgba(230, 57, 70, 0.2);
    color: var(--accent);
}

.stat-card-mobile.total .stat-icon-mobile {
    background: rgba(141, 153, 174, 0.2);
    color: var(--gray);
}

.stat-value-mobile {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 5px;
}

.stat-label-mobile {
    font-size: 0.85rem;
    color: var(--gray);
}

/* ===== INFO CARDS ===== */
.info-card {
    background: var(--secondary);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
}

.info-card h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-card h3 i {
    color: var(--accent);
}

.info-card p {
    color: var(--gray);
    font-size: 0.9rem;
    line-height: 1.6;
}

.info-list {
    list-style: none;
    padding: 0;
}

.info-list li {
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.info-list li i {
    color: var(--safe);
}

.version-card {
    text-align: center;
}

.status-online {
    color: var(--safe);
}

.status-online i {
    font-size: 0.6rem;
    margin-right: 4px;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.disclaimer-mobile {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.disclaimer-mobile i {
    color: var(--warning);
    margin-top: 2px;
}

/* ===== NO DATA ===== */
.no-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--gray);
}

.no-data i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* ===== EXPORT BUTTON ===== */
.export-btn-mobile {
    background: var(--card-bg);
    border: 2px solid rgba(42, 157, 143, 0.3);
    border-radius: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--safe);
    cursor: pointer;
    transition: var(--transition);
}

.export-btn-mobile:active {
    transform: scale(0.9);
}

/* ===== TOAST NOTIFICATION ===== */
.toast {
    position: fixed;
    top: calc(var(--header-height) - 30px);
    left: 20px;
    right: 20px;
    background: var(--secondary);
    border-left: 4px solid var(--accent);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow);
    transform: translateY(-150%);
    transition: transform 0.3s ease;
    z-index: 200;
}

.toast.show {
    transform: translateY(0);
}

.toast-icon {
    font-size: 1.5rem;
}

.toast.success {
    border-left-color: var(--safe);
}

.toast.success .toast-icon {
    color: var(--safe);
}

.toast.warning {
    border-left-color: var(--warning);
}

.toast.warning .toast-icon {
    color: var(--warning);
}

.toast.error {
    border-left-color: var(--accent);
}

.toast.error .toast-icon {
    color: var(--accent);
}

.toast-message {
    flex: 1;
    font-size: 0.9rem;
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 300;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    text-align: center;
}

.loading-spinner i {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 15px;
}

.loading-spinner p {
    color: var(--light);
    font-size: 1rem;
}

/* ===== UTILITIES ===== */
.hidden {
    display: none !important;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--primary);
}

::-webkit-scrollbar-thumb {
    background: var(--gray);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}