/* BUILDORIA Portal - Main Stylesheet */

:root {
    /* BUILDORIA Brand Colors - Orange Theme */
    --primary: #f59e0b;
    --primary-dark: #d97706;
    --primary-light: #fbbf24;
    --primary-green: #f59e0b; /* Legacy alias - now orange */
    --dark-green: #d97706;
    --light-green: #fbbf24;
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-red: #ef4444;
    --accent-yellow: #eab308;
    --accent-blue: #3b82f6;
    --accent-purple: #a855f7;
    --accent-orange: #f59e0b;
    --border-color: #334155;
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-darker);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

a {
    color: var(--primary-green);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--light-green);
}

/* Login Page Specific Styles */
.login-page {
    min-height: 100vh;
    display: flex;
    position: relative;
    overflow: hidden;
}

.login-left {
    flex: 1.5;
    background: linear-gradient(135deg, #78350f 0%, #b45309 30%, #f59e0b 50%, #fbbf24 70%, #d97706 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.15) 0%, transparent 40%),
        radial-gradient(circle at 40% 40%, rgba(255,255,255,0.1) 0%, transparent 30%);
    pointer-events: none;
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.star {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
    animation: twinkle 2s infinite;
}

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

.planet {
    position: absolute;
    border-radius: 50%;
}

.planet-1 {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    top: 15%;
    left: 5%;
    box-shadow: inset -10px -10px 20px rgba(0,0,0,0.3);
}

.planet-1::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -20px;
    right: -20px;
    height: 10px;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.6), transparent);
    transform: rotate(-15deg);
    border-radius: 50%;
}

.planet-2 {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    bottom: 25%;
    left: 3%;
    box-shadow: inset -15px -15px 30px rgba(0,0,0,0.3);
}

.planet-2::before {
    content: '';
    position: absolute;
    width: 160px;
    height: 20px;
    border: 3px solid rgba(168, 85, 247, 0.5);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-20deg);
}

.moon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #e5e7eb, #9ca3af);
    position: absolute;
    border-radius: 50%;
    bottom: 20%;
    right: 25%;
    box-shadow: inset -8px -8px 15px rgba(0,0,0,0.2);
}

.moon::before,
.moon::after {
    content: '';
    position: absolute;
    background: rgba(156, 163, 175, 0.5);
    border-radius: 50%;
}

.moon::before {
    width: 15px;
    height: 15px;
    top: 10px;
    left: 15px;
}

.moon::after {
    width: 10px;
    height: 10px;
    bottom: 15px;
    right: 10px;
}

.rocket {
    position: absolute;
    top: 10%;
    right: 10%;
    font-size: 3rem;
    animation: float 3s ease-in-out infinite;
    transform: rotate(45deg);
}

@keyframes float {
    0%, 100% { transform: rotate(45deg) translateY(0); }
    50% { transform: rotate(45deg) translateY(-20px); }
}

.login-content {
    text-align: center;
    z-index: 10;
    color: white;
}

.login-logo {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    background: linear-gradient(135deg, #f5f5f5, #cacaca);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.login-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 3px 3px 15px rgba(0,0,0,0.3);
    line-height: 1.1;
}

.login-description {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.login-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-dark {
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-dark:hover {
    background: rgba(0, 0, 0, 0.6);
}

.btn-light {
    background: white;
    color: #166534;
}

.btn-light:hover {
    background: #f1f5f9;
}

.btn-primary {
    background: var(--accent-red);
    color: white;
    width: 100%;
    justify-content: center;
    padding: 1rem;
    font-size: 1rem;
}

.btn-primary:hover {
    background: #dc2626;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
}

.characters {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 1rem;
    padding: 0 2rem;
}

.character {
    width: 60px;
    height: 80px;
    background: linear-gradient(180deg, #64748b 0%, #475569 100%);
    border-radius: 30px 30px 10px 10px;
    position: relative;
}

.earth-curve {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(180deg, #3b82f6 0%, #1e40af 100%);
    border-radius: 100% 100% 0 0;
}

.login-right {
    flex: 1;
    background: var(--bg-darker);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.login-right::before {
    content: '';
    position: absolute;
    top: 5%;
    right: 15%;
    font-size: 4rem;
}

.login-box {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.login-box-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.1);
}

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

.input-with-icon {
    position: relative;
}

.input-with-icon .form-input {
    padding-right: 3rem;
}

.input-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
}

.form-footer {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
}

.forgot-password {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.forgot-password:hover {
    color: var(--primary-green);
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

.register-link {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Dashboard Styles */
.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-green);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-logo span {
    background: linear-gradient(135deg, var(--primary-green), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    padding-left: 0.75rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    color: var(--text-secondary);
    transition: all 0.2s;
    margin-bottom: 0.25rem;
}

.nav-link:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.nav-link.active {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.nav-link i {
    width: 20px;
    text-align: center;
}

.nav-badge {
    margin-left: auto;
    background: var(--accent-red);
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: var(--bg-dark);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--primary-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
    background: var(--bg-darker);
}

.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-secondary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.stat-card:hover {
    border-color: var(--primary-green);
    transform: translateY(-2px);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-icon.green {
    background: rgba(74, 222, 128, 0.1);
    color: var(--primary-green);
}

.stat-icon.blue {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
}

.stat-icon.yellow {
    background: rgba(234, 179, 8, 0.1);
    color: var(--accent-yellow);
}

.stat-icon.purple {
    background: rgba(168, 85, 247, 0.1);
    color: var(--accent-purple);
}

.stat-icon.red {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

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

.stat-change {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-change.positive {
    color: var(--success);
}

.stat-change.negative {
    color: var(--error);
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.card {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

.message-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-dark);
    border-radius: 8px;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    flex-shrink: 0;
}

.message-content {
    flex: 1;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.message-author {
    font-weight: 600;
    font-size: 0.9rem;
}

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

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

.transaction-list {
    display: flex;
    flex-direction: column;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.transaction-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.transaction-icon.income {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.transaction-icon.expense {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.transaction-details h4 {
    font-size: 0.9rem;
    font-weight: 500;
}

.transaction-details span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.transaction-amount {
    font-weight: 600;
}

.transaction-amount.positive {
    color: var(--success);
}

.transaction-amount.negative {
    color: var(--error);
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.leaderboard-item:last-child {
    border-bottom: none;
}

.leaderboard-rank {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.leaderboard-rank.gold {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #78350f;
}

.leaderboard-rank.silver {
    background: linear-gradient(135deg, #e5e7eb, #9ca3af);
    color: #374151;
}

.leaderboard-rank.bronze {
    background: linear-gradient(135deg, #fdba74, #f97316);
    color: #7c2d12;
}

.leaderboard-player {
    flex: 1;
}

.leaderboard-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.leaderboard-value {
    font-weight: 600;
    color: var(--primary-green);
}

.achievement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.achievement-item {
    background: var(--bg-dark);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.2s;
    border: 1px solid transparent;
}

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

.achievement-item.locked {
    opacity: 0.5;
    filter: grayscale(1);
}

.achievement-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    margin: 0 auto 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.achievement-icon.common {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

.achievement-icon.uncommon {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.achievement-icon.rare {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent-blue);
}

.achievement-icon.epic {
    background: rgba(168, 85, 247, 0.2);
    color: var(--accent-purple);
}

.achievement-icon.legendary {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.achievement-name {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.achievement-points {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.verification-box {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.verification-code {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.5rem;
    color: var(--accent-blue);
    font-family: 'Courier New', monospace;
    margin: 1rem 0;
}

.verification-instructions {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.verification-command {
    background: var(--bg-dark);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    color: var(--primary-green);
    display: inline-block;
}

/* Friends List */
.friends-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.friend-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-dark);
    border-radius: 8px;
}

.friend-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.friend-status.online {
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
}

.friend-status.offline {
    background: var(--text-muted);
}

.friend-info {
    flex: 1;
}

.friend-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.friend-last-seen {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Notifications */
.notification-list {
    display: flex;
    flex-direction: column;
}

.notification-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.notification-item:hover {
    background: var(--bg-dark);
}

.notification-item.unread {
    background: rgba(74, 222, 128, 0.05);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.notification-message {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* ============================================
   RESPONSIVE STYLES - COMPREHENSIVE MOBILE
   ============================================ */

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    width: 44px;
    height: 44px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.mobile-menu-toggle:hover {
    background: var(--primary);
    color: var(--bg-darker);
}

/* Mobile Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-overlay.active {
    opacity: 1;
}

/* Tablet Breakpoint */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-overlay {
        display: block;
        pointer-events: none;
    }
    
    .mobile-overlay.active {
        pointer-events: auto;
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        transform: translateX(-100%);
        z-index: 100;
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding-top: 70px;
    }
    
    .dashboard {
        flex-direction: column;
    }
    
    .page-header {
        padding: 1rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
}

/* Mobile Breakpoint */
@media (max-width: 768px) {
    /* Login Page */
    .login-page {
        flex-direction: column;
    }
    
    .login-left {
        min-height: 35vh;
        padding: 1.5rem;
    }
    
    .login-right {
        padding: 1.5rem;
        flex: 1;
    }
    
    .login-box {
        padding: 1.5rem;
    }
    
    .login-title {
        font-size: 2rem;
    }
    
    .login-logo {
        font-size: 2rem;
    }
    
    .login-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .login-buttons .btn {
        width: 100%;
    }
    
    /* Stats Grid */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    /* Cards */
    .card {
        border-radius: 12px;
        margin: 0 -0.5rem;
    }
    
    .card-header {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Tables - Horizontal Scroll */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 600px;
    }
    
    /* Buttons */
    .btn {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
    }
    
    /* Forms */
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    input, select, textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Modals */
    .modal-content {
        width: 95%;
        max-width: none;
        margin: 1rem;
        max-height: 90vh;
        border-radius: 16px;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    /* Achievements Grid */
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .achievement-item {
        padding: 1rem;
    }
    
    .achievement-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .achievement-name {
        font-size: 0.75rem;
    }
    
    /* Notifications */
    .notification-item {
        padding: 0.875rem;
        gap: 0.75rem;
    }
    
    .notification-icon {
        width: 36px;
        height: 36px;
    }
    
    .notification-title {
        font-size: 0.85rem;
    }
    
    .notification-message {
        font-size: 0.8rem;
    }
    
    /* Friends */
    .friend-item {
        padding: 0.625rem;
    }
    
    .friend-avatar img {
        width: 40px;
        height: 40px;
    }
    
    /* Verification */
    .verification-box {
        padding: 1.5rem 1rem;
    }
    
    .verification-code {
        font-size: 1.75rem;
        letter-spacing: 0.25rem;
    }
    
    /* Page Headers */
    .page-header {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .page-title {
        font-size: 1.25rem;
    }
    
    .page-subtitle {
        font-size: 0.85rem;
    }
    
    /* Alerts */
    .alert {
        padding: 0.875rem;
        font-size: 0.875rem;
        border-radius: 10px;
    }
}

/* Small Mobile Breakpoint */
@media (max-width: 480px) {
    /* Extra small adjustments */
    .login-left {
        min-height: 30vh;
    }
    
    .login-title {
        font-size: 1.75rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .achievements-grid {
        grid-template-columns: 1fr;
    }
    
    .verification-code {
        font-size: 1.5rem;
        letter-spacing: 0.15rem;
    }
    
    .btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.8rem;
    }
    
    .page-title {
        font-size: 1.1rem;
    }
    
    /* Hide less important elements */
    .hide-mobile {
        display: none !important;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn {
        min-height: 44px;
    }
    
    input, select, textarea {
        min-height: 44px;
    }
    
    .friend-item,
    .notification-item,
    .achievement-item {
        min-height: 48px;
    }
    
    /* Remove hover effects on touch devices */
    .btn:hover {
        transform: none;
    }
    
    .card:hover {
        transform: none;
    }
}

/* Safe area insets for notched devices */
@supports (padding: max(0px)) {
    .sidebar {
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }
    
    .main-content {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }
    
    .mobile-menu-toggle {
        top: max(1rem, env(safe-area-inset-top));
        left: max(1rem, env(safe-area-inset-left));
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--text-muted); }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
