/* ========================================
   BASE STYLES - Variables, Reset, Layout
   ======================================== */

/* CSS Variables - Mint Fresh Theme */
:root {
    --primary: #14b8a6;
    --primary-dark: #0f766e;
    --primary-light: #2dd4bf;
    --secondary: #06b6d4;
    --accent: #f59e0b;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --background: #f0fdf9;
    --surface: #ffffff;
    --surface-elevated: #ecfdf5;
    --text-primary: #0f172a;
    --text-secondary: #0f766e;
    --text-muted: #64748b;
    --border: #ccfbf1;
    --shadow: rgba(0, 0, 0, 0.08);
    --shadow-light: rgba(20, 184, 166, 0.15);
    --gradient-primary: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #0ea5e9 100%);
    --gradient-accent: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* Reset Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* App Layout */
.app {
    min-height: 100vh;
    background: var(--background);
    position: relative;
}

.app::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(20, 184, 166, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
    position: relative;
    z-index: 100;
    animation: slideDown 0.6s ease-out;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 50px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 8px 32px var(--shadow-light);
    animation: bounce 0.8s ease-out;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Icon Buttons */
.btn-icon-small {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-small:hover {
    background: var(--surface-elevated);
    color: var(--primary);
}

.btn-icon-small i {
    font-size: 14px;
}

/* User Account Button */
.user-account {
    position: relative;
}

.user-account-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px 6px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.user-account-btn:hover {
    background: var(--surface-elevated);
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.2);
}

.user-badge-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-display-name {
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 110px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.user-avatar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    font-size: 18px;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.points-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    color: white;
    box-shadow: 0 2px 6px rgba(251, 191, 36, 0.3);
}

.points-badge i {
    font-size: 12px;
    color: white;
}

.user-username {
    font-weight: 500;
    opacity: 0.9;
}

.user-account-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 280px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px var(--shadow);
    display: none;
    z-index: 1000;
    overflow: hidden;
}

.user-account-dropdown.show {
    display: block;
    animation: fadeInDown 0.3s ease-out;
}

.user-info {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--surface-elevated);
}

.user-avatar {
    position: relative;
    font-size: 48px;
    color: var(--text-primary);
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.header-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-upload-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar:hover .avatar-upload-overlay {
    height: 24px;
}

.avatar-upload-label {
    cursor: pointer;
    color: white;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.avatar-upload-label:hover {
    color: var(--primary);
}

.user-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 16px;
}

.user-email {
    font-size: 13px;
    color: var(--text-secondary);
}

.user-points-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-points-display i {
    font-size: 24px;
    color: #fbbf24;
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.dropdown-item:hover {
    background: var(--surface-elevated);
}

.logout-btn {
    color: #ef4444;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.screen {
    display: none;
    animation: screenTransition 0.4s ease-out;
}

.screen.active {
    display: block;
}
