/* Mail Stream Tracker - Modern Premium Design */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500&display=swap');

:root {
    /* Color System - Warm, inviting palette */
    --primary: #e63946;
    --primary-dark: #c1121f;
    --primary-light: #ff6b6b;
    --primary-glow: rgba(230, 57, 70, 0.15);
    
    --accent: #f77f00;
    --accent-light: #fcbf49;
    
    --surface-dark: #0f1419;
    --surface: #1a1f26;
    --surface-light: #242b35;
    --surface-lighter: #2d3640;
    
    --text-primary: #f7f9fc;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.12);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.12);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.12);
    
    --border: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.1);
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 60px rgba(230, 57, 70, 0.15);
    
    --radius: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Emoji Styling - Preserve native colors */
.emoji, 
[role="img"],
.profile-detail-icon,
.stat-icon,
.tree-icon,
.log-icon,
.empty-state .icon {
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Android Emoji", "EmojiOne Color", sans-serif;
    font-style: normal;
    font-weight: normal;
    color: initial;
    -webkit-text-fill-color: initial;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--surface-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(230, 57, 70, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(247, 127, 0, 0.08), transparent),
        radial-gradient(ellipse 50% 30% at 0% 100%, rgba(59, 130, 246, 0.06), transparent);
    pointer-events: none;
    z-index: -1;
}

/* Container */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
}

/* Header */
.header {
    text-align: center;
    padding: 48px 24px 32px;
    position: relative;
}

.header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
    background-size: 200% auto;
}

.header h1 .emoji {
    -webkit-text-fill-color: initial;
    background: none;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 200% center; }
}

.header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Card */
.card {
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-light) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    animation: cardSlideUp 0.6s ease-out;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

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

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.card h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.card h3 {
    color: var(--text-primary);
    font-size: 1.15rem;
    font-weight: 600;
    margin: 28px 0 16px;
    letter-spacing: -0.01em;
}

/* Navigation */
.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 18px;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.nav-links a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary);
    opacity: 0;
    transition: var(--transition);
    border-radius: var(--radius);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::before {
    opacity: 0.1;
}

.nav-links a.active {
    color: white;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 4px 16px rgba(230, 57, 70, 0.3);
}

.nav-links a.active::before {
    display: none;
}

/* Forms */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    background: var(--surface-dark);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow), var(--shadow);
    background: var(--surface);
}

.form-group textarea {
    min-height: 130px;
    resize: vertical;
}

/* Password field with show/hide toggle button */
.password-wrapper {
    display: flex !important;
    gap: 8px;
    align-items: stretch;
}

.form-group .password-wrapper input,
.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
}

.password-toggle {
    background: var(--surface-dark);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    cursor: pointer;
    padding: 0 12px;
    font-size: 1.1em;
    line-height: 1;
    color: var(--text-secondary);
    transition: var(--transition);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    max-width: 50px;
}

.password-toggle:hover,
.password-toggle:focus {
    background: var(--surface-light);
    border-color: var(--primary);
    color: var(--text-primary);
}

@media (max-width: 600px) {
    .password-toggle {
        padding: 0 10px;
        min-width: 40px;
        max-width: 44px;
        font-size: 1em;
    }
}

.form-group small {
    display: block;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 44px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* Buttons */
button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
    position: relative;
    overflow: hidden;
}

button::before, .btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 100%);
    opacity: 0;
    transition: var(--transition);
}

button:hover, .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(230, 57, 70, 0.4);
}

button:hover::before, .btn:hover::before {
    opacity: 1;
}

button:active, .btn:active {
    transform: translateY(0);
}

.btn.secondary {
    background: var(--surface-lighter);
    color: var(--text-primary);
}

.btn.secondary:hover {
    background: var(--surface-light);
    box-shadow: var(--shadow);
}

.btn.success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
}

.btn.success:hover {
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.btn.warning {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
}

.btn.danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
}

.btn.danger:hover {
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

.btn.small {
    padding: 10px 18px;
    font-size: 0.875rem;
}

.btn-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Alerts */
.success, .error, .warning, .info {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: alertSlide 0.3s ease-out;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

@keyframes alertSlide {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.success {
    background: var(--success-bg);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.error {
    background: var(--danger-bg);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.warning {
    background: var(--warning-bg);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.info {
    background: var(--info-bg);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin: 28px 0;
}

.stat-card {
    background: var(--surface-light);
    border: 1px solid var(--border);
    padding: 24px 16px;
    border-radius: var(--radius);
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-light);
    box-shadow: var(--shadow);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.stat-value .emoji {
    -webkit-text-fill-color: initial;
    background: none;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 6px;
}

.stat-detail {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 4px;
}

/* Map Container */
.map-container {
    height: 420px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    margin: 20px 0;
    background: var(--surface-dark);
}

.map-container > div {
    height: 100%;
    width: 100%;
}

.map-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 10px;
}

.geo-buttons {
    margin: 12px 0;
}

/* Entries */
.entry {
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    border-left: 4px solid var(--primary);
    transition: var(--transition);
}

.entry:hover {
    border-color: var(--border-light);
    transform: translateX(4px);
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}

.entry-name {
    font-weight: 600;
    color: var(--text-primary);
}

.entry-name a {
    color: var(--primary-light);
    text-decoration: none;
    transition: var(--transition);
}

.entry-name a:hover {
    color: var(--accent);
}

.entry-location {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.entry-date {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
}

.entry-message {
    margin-top: 12px;
    padding: 14px 18px;
    background: var(--surface-dark);
    border-radius: var(--radius);
    font-style: italic;
    color: var(--text-secondary);
    border-left: 2px solid var(--border-light);
}

/* Label Info Box - Track Page */
.label-info-box {
    margin: 20px 0;
    padding: 24px;
    background: linear-gradient(135deg, var(--surface-light) 0%, var(--surface) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    /* Cross-browser text wrapping */
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
    /* Ensure container constrains content */
    max-width: 100%;
    box-sizing: border-box;
}

.label-info-label {
    font-size: 0.75em;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    font-weight: 600;
}

.label-info-id {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Courier New', monospace;
    font-size: 1.4em;
    font-weight: 700;
    color: var(--primary);
    word-break: break-all;
    letter-spacing: 0.02em;
}

.label-info-message {
    margin-top: 20px;
    padding: 16px 20px;
    background: var(--surface-dark);
    border-radius: var(--radius);
    border-left: 3px solid var(--primary);
    color: var(--text-secondary);
    line-height: 1.7;
    font-style: italic;
    font-size: 1.05em;
    /* Critical for Android text wrapping */
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    /* Prevent overflow */
    max-width: 100%;
    overflow: hidden;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge.success {
    background: var(--success-bg);
    color: #6ee7b7;
}

.badge.warning {
    background: var(--warning-bg);
    color: #fcd34d;
}

.badge.danger {
    background: var(--danger-bg);
    color: #fca5a5;
}

.badge.info {
    background: var(--info-bg);
    color: #93c5fd;
}

/* Label Items */
.label-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    transition: var(--transition);
}

.label-item:hover {
    transform: translateX(6px);
    border-color: var(--border-light);
    box-shadow: var(--shadow);
}

.label-id {
    font-weight: 700;
    font-size: 1.1rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--primary-light);
}

.label-stats {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 6px;
}

.label-actions {
    display: flex;
    gap: 10px;
}

/* Messages */
.message-item {
    padding: 20px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    border-left: 4px solid var(--border);
    transition: var(--transition);
}

.message-item.unread {
    background: rgba(59, 130, 246, 0.08);
    border-left-color: var(--info);
}

.message-item:hover {
    box-shadow: var(--shadow);
    transform: translateX(4px);
}

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

.message-from {
    font-weight: 600;
    color: var(--text-primary);
}

.message-date {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
}

.message-subject {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 6px;
}

.message-preview {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: var(--surface-dark);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.data-table tr {
    transition: var(--transition);
}

.data-table tr:hover {
    background: var(--surface-light);
}

.data-table td {
    color: var(--text-primary);
}

/* Profile Card */
.profile-card {
    text-align: center;
    padding: 40px 32px;
}

.profile-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.75rem;
    font-weight: 700;
    margin: 0 auto 24px;
    box-shadow: 0 8px 32px rgba(230, 57, 70, 0.3);
    position: relative;
}

.profile-avatar::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    opacity: 0.3;
}

.profile-name {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.profile-username {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 8px;
    font-family: 'JetBrains Mono', monospace;
}

.profile-title {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

.profile-info-item {
    display: flex;
    gap: 12px;
    align-items: center;
    color: var(--text-secondary);
}

.profile-info-item .icon {
    width: 28px;
    text-align: center;
}

/* Leaderboard */
.leaderboard-section {
    margin-bottom: 36px;
}

.leaderboard-section h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 18px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    transition: var(--transition);
}

.leaderboard-item:hover {
    transform: translateX(6px);
    box-shadow: var(--shadow);
}

.leaderboard-rank {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--surface-lighter);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 18px;
    font-size: 1.1rem;
}

.leaderboard-rank.gold { 
    background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%);
    color: #78350f;
    box-shadow: 0 4px 16px rgba(252, 211, 77, 0.3);
}

.leaderboard-rank.silver { 
    background: linear-gradient(135deg, #e5e7eb 0%, #9ca3af 100%);
    color: #374151;
    box-shadow: 0 4px 16px rgba(156, 163, 175, 0.3);
}

.leaderboard-rank.bronze { 
    background: linear-gradient(135deg, #fdba74 0%, #ea580c 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(234, 88, 12, 0.3);
}

.leaderboard-info {
    flex: 1;
}

.leaderboard-name {
    font-weight: 600;
    color: var(--text-primary);
}

.leaderboard-stat {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.leaderboard-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-light);
    font-family: 'JetBrains Mono', monospace;
}

/* No Entries */
.no-entries {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* Fade Warning */
.fade-warning {
    background: var(--warning-bg);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: var(--radius);
    padding: 24px;
    margin: 24px 0;
    text-align: center;
}

.fade-warning h4 {
    color: var(--warning);
    margin-bottom: 10px;
    font-weight: 600;
}

/* Add Entry Section */
.add-entry-section {
    background: var(--surface-light);
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-top: 32px;
    transition: var(--transition);
}

.add-entry-section:hover {
    border-color: var(--primary);
    border-style: solid;
}

.add-entry-section h3 {
    color: var(--primary-light);
    margin-bottom: 20px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 28px 0;
}

.dashboard-card {
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: var(--transition);
}

.dashboard-card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow);
}

.dashboard-card h3 {
    margin-bottom: 16px;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.dashboard-card p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.7;
}

/* Lookup Section */
.lookup-section {
    background: linear-gradient(135deg, var(--surface-light) 0%, var(--surface) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    text-align: center;
    margin-bottom: 28px;
}

.lookup-section h3 {
    margin-bottom: 24px;
    color: var(--text-primary);
}

.lookup-section input {
    max-width: 320px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.25rem;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* PDF Options */
.pdf-options {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin: 24px 0;
    padding: 24px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

/* Generated Labels List */
.generated-list {
    margin: 24px 0;
}

.generated-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    color: var(--primary-light);
    transition: var(--transition);
}

.generated-item:hover {
    border-color: var(--primary);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
}

.tab {
    padding: 12px 24px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 500;
    font-family: inherit;
    border-radius: var(--radius) var(--radius) 0 0;
    transition: var(--transition);
    position: relative;
}

.tab::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.tab:hover {
    color: var(--text-primary);
    background: var(--surface-light);
}

.tab.active {
    color: var(--primary-light);
}

.tab.active::after {
    transform: scaleX(1);
}

/* Signup Prompt */
.signup-prompt {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 32px;
    border-radius: var(--radius-lg);
    text-align: center;
    margin-top: 28px;
    position: relative;
    overflow: hidden;
}

.signup-prompt::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
}

.signup-prompt h4 {
    margin-bottom: 12px;
    font-size: 1.25rem;
    position: relative;
}

.signup-prompt p {
    margin-bottom: 20px;
    opacity: 0.9;
    position: relative;
}

.signup-prompt .btn {
    background: white;
    color: var(--primary);
    position: relative;
}

.signup-prompt .btn:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Links */
a {
    color: var(--primary-light);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--surface-lighter);
    border-radius: 5px;
}

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

/* Selection */
::selection {
    background: var(--primary);
    color: white;
}

/* Focus Visible */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.75rem;
    }
    
    .card {
        padding: 24px 20px;
        border-radius: var(--radius);
    }
    
    .nav-links {
        justify-content: center;
    }
    
    .nav-links a {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .label-item {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .entry-header {
        flex-direction: column;
    }
    
    .map-container {
        height: 320px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .leaderboard-item {
        flex-wrap: wrap;
    }
    
    .leaderboard-value {
        width: 100%;
        text-align: right;
        margin-top: 8px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 16px;
    }
    
    .header {
        padding: 32px 16px 24px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .card {
        padding: 20px 16px;
    }
    
    /* Label info box mobile styles */
    .label-info-box {
        padding: 20px;
        margin: 16px 0;
    }
    
    .label-info-id {
        font-size: 1.2em;
    }
    
    .label-info-message {
        font-size: 0.95em;
        line-height: 1.6;
        padding: 14px 16px;
        margin-top: 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-value {
        font-size: 1.75rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .pdf-options {
        flex-direction: column;
    }
    
    button, .btn {
        width: 100%;
    }
}

/* Print styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .nav-links, button, .btn {
        display: none;
    }
}
