:root {
    /* Base-Inspired Light Theme (from screenshot) */
    --primary: #5BA3E5;
    --primary-dark: #4A8DC9;
    --primary-light: #7AB8ED;
    --secondary: #6BB4F1;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --background: #EBF4FA;
    --surface: #FFFFFF;
    --card-bg: #FFFFFF;
    --text-primary: #1A3A52;
    --text-secondary: #5A7B92;
    --border: #D0E5F2;
    --shadow: rgba(91, 163, 229, 0.15);
    --tap-button-bg: linear-gradient(135deg, #5BA3E5 0%, #7AB8ED 100%);
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --primary: #5BA3E5;
    --primary-dark: #4A8DC9;
    --primary-light: #7AB8ED;
    --secondary: #6BB4F1;
    --success: #34d399;
    --warning: #fbbf24;
    --error: #f87171;
    --background: #0A1929;
    --surface: #1A2F42;
    --card-bg: #1E3A52;
    --text-primary: #E8F4FA;
    --text-secondary: #94B3C8;
    --border: #2A4A62;
    --shadow: rgba(0, 0, 0, 0.4);
    --tap-button-bg: linear-gradient(135deg, #5BA3E5 0%, #7AB8ED 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--transition);
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-screen p {
    margin-top: var(--spacing-md);
    color: var(--text-secondary);
}

/* App Container */
.app-container {
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--background);
}

/* Header */
.app-header {
    background: var(--primary);
    color: white;
    padding: var(--spacing-lg) var(--spacing-md);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    box-shadow: 0 4px 16px var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.header-icon {
    font-size: 32px;
}

.app-title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.app-tagline {
    text-align: center;
    font-size: 16px;
    opacity: 0.95;
    letter-spacing: 2px;
    font-weight: 500;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.25);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.05);
}

.theme-toggle .material-symbols-outlined {
    color: white;
    font-size: 24px;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: var(--spacing-md);
    padding-bottom: 100px;
    overflow-y: auto;
}

/* Card Styles */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    box-shadow: 0 2px 12px var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.card:hover {
    box-shadow: 0 4px 16px var(--shadow);
}

/* Points Card */
.card-header {
    margin-bottom: var(--spacing-sm);
}

.card-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

.points-display {
    margin-bottom: var(--spacing-lg);
}

.points-value {
    font-size: 48px;
    font-weight: 800;
    color: var(--primary);
    display: block;
}

.stats-row {
    display: flex;
    justify-content: space-around;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.divider {
    height: 1px;
    background: var(--border);
    margin: var(--spacing-md) 0;
}

.daily-clicks-section {
    margin-top: var(--spacing-md);
}

.clicks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.clicks-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

.clicks-label .material-symbols-outlined {
    font-size: 16px;
}

.clicks-count {
    font-weight: 700;
    color: var(--primary);
}

.progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.clicks-limit-message {
    margin-top: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
}

/* Tap Section */
.tap-section {
    text-align: center;
}

.stamina-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--tap-button-bg);
    border-radius: var(--radius-md);
    color: white;
}

.stamina-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-weight: 700;
}

.stamina-value {
    font-size: 24px;
    font-weight: 800;
}

.stamina-max {
    opacity: 0.8;
}

/* Timer Display */
.timer-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-lg) 0;
}

.timer-circle {
    position: relative;
    width: 180px;
    height: 180px;
    margin-bottom: var(--spacing-md);
}

.timer-svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.timer-track {
    fill: none;
    stroke: var(--border);
    stroke-width: 8;
}

.timer-progress {
    fill: none;
    stroke: var(--warning);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear;
}

.timer-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timer-icon {
    font-size: 48px;
    color: var(--warning);
    margin-bottom: var(--spacing-xs);
}

.timer-label {
    font-weight: 700;
    color: var(--warning);
    font-size: 14px;
}

.timer-text {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

/* Tap Button */
.tap-button-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tap-button {
    position: relative;
    width: 200px;
    height: 200px;
    border: none;
    border-radius: 50%;
    background: var(--tap-button-bg);
    color: white;
    font-size: 24px;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 8px 24px rgba(91, 163, 229, 0.4);
    overflow: hidden;
}

.tap-button:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(91, 163, 229, 0.5);
}

.tap-button:active:not(:disabled) {
    transform: scale(0.95);
}

.tap-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tap-button-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.tap-icon {
    font-size: 64px;
    margin-bottom: var(--spacing-xs);
}

.tap-text {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 2px;
}

.points-animation {
    position: absolute;
    pointer-events: none;
}

/* Tap Counter */
.tap-counter {
    margin-top: var(--spacing-lg);
    text-align: center;
}

.tap-counter span:first-child {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--spacing-xs);
}

.tap-counter-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Tasks Section */
.section-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.section-header h2 {
    font-size: 20px;
    font-weight: 700;
}

.section-header .material-symbols-outlined {
    color: var(--primary);
    font-size: 24px;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.task-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--background);
    border-radius: var(--radius-md);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.task-item:hover {
    border-color: var(--primary);
    background: var(--surface);
}

.task-icon-container {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    flex-shrink: 0;
}

.task-icon {
    font-size: 24px;
}

.task-info {
    flex: 1;
}

.task-title {
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.task-reward {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--warning);
    font-size: 14px;
    font-weight: 600;
}

.task-reward .material-symbols-outlined {
    font-size: 16px;
}

.task-claim-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    font-size: 14px;
}

.task-claim-btn:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.task-claim-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.task-cooldown {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 700;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: var(--spacing-md);
    display: flex;
    gap: var(--spacing-md);
    box-shadow: 0 -4px 12px var(--shadow);
}

.nav-button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-md);
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
}

.nav-button:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.primary-nav-btn {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.primary-nav-btn:hover {
    background: var(--primary-dark);
}

/* Dialog Overlay */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: var(--spacing-md);
    backdrop-filter: blur(4px);
}

/* Dialog */
.dialog {
    background: var(--surface);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: dialogSlideIn 0.3s ease;
}

.dialog-large {
    max-width: 600px;
}

@keyframes dialogSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dialog-header {
    position: relative;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border);
}

.dialog-header h2 {
    font-size: 24px;
    font-weight: 800;
}

.dialog-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: rgba(0, 0, 0, 0.1);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.dialog-close:hover {
    background: rgba(0, 0, 0, 0.2);
}

.dialog-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-lg);
}

.dialog-actions {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--border);
    display: flex;
    gap: var(--spacing-md);
}

/* Input Groups */
.input-group {
    margin-bottom: var(--spacing-md);
}

.input-group label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    font-size: 14px;
}

.input-group input {
    width: 100%;
    padding: var(--spacing-md);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 16px;
    background: var(--background);
    color: var(--text-primary);
    transition: var(--transition);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Buttons */
.btn-primary,
.btn-secondary {
    flex: 1;
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--success);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #059669;
    transform: translateY(-2px);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--background);
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary);
}

/* USDT Preview */
.usdt-preview {
    padding: var(--spacing-md);
    background: rgba(16, 185, 129, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
}

.usdt-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
}

.usdt-amount {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 28px;
    font-weight: 800;
    color: var(--success);
}

/* Info Card */
.info-card {
    padding: var(--spacing-md);
    background: rgba(91, 163, 229, 0.08);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.info-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    color: var(--primary);
    font-weight: 600;
}

.info-list {
    list-style: none;
    padding-left: 0;
}

.info-list li {
    padding: var(--spacing-xs) 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.info-list li::before {
    content: "•";
    color: var(--primary);
    font-weight: bold;
    display: inline-block;
    width: 1em;
}

/* Error Message */
.error-message {
    padding: var(--spacing-md);
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    font-size: 14px;
}

/* History */
.history-stats {
    display: flex;
    justify-content: space-around;
    padding: var(--spacing-lg);
    background: var(--background);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
}

.history-stat {
    text-align: center;
}

.history-stat-value {
    font-size: 24px;
    font-weight: 800;
    display: block;
    margin-bottom: var(--spacing-xs);
}

.history-stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.history-item {
    padding: var(--spacing-md);
    background: var(--background);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.history-item-title {
    font-weight: 700;
}

.history-status {
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
}

.status-pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.status-completed {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-rejected {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.history-item-details {
    display: flex;
    justify-content: space-between;
    margin-top: var(--spacing-sm);
    font-size: 14px;
    color: var(--text-secondary);
}

.empty-state {
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-md);
}

.empty-state .material-symbols-outlined {
    font-size: 72px;
    color: var(--text-secondary);
    opacity: 0.3;
}

.empty-state h3 {
    margin: var(--spacing-md) 0 var(--spacing-sm);
}

.empty-state p {
    color: var(--text-secondary);
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--surface);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px var(--shadow);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 10000;
    max-width: 300px;
    border: 1px solid var(--border);
}

.toast.show {
    transform: translateX(0);
}

/* Responsive */
@media (max-width: 600px) {
    .app-header {
        padding: var(--spacing-md);
    }
    
    .app-title {
        font-size: 28px;
    }
    
    .points-value {
        font-size: 40px;
    }
    
    .tap-button {
        width: 180px;
        height: 180px;
    }
    
    .tap-icon {
        font-size: 56px;
    }
    
    .dialog {
        max-width: 100%;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Points Animation */
@keyframes pointsFloat {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-60px);
    }
}

.floating-points {
    position: absolute;
    font-weight: 800;
    font-size: 24px;
    color: var(--warning);
    pointer-events: none;
    animation: pointsFloat 1s ease-out forwards;
}