/* Modern CSS Reset & Variable Definitions */
:root[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-surface: rgba(255, 255, 255, 0.7);
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border-color: rgba(255, 255, 255, 0.5);
    --border-stroke: rgba(15, 23, 42, 0.08);
    --shadow-color: rgba(148, 163, 184, 0.12);
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: rgba(59, 130, 246, 0.1);
    --accent: #10b981;
    --gradient-1: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --glass-blur: 16px;
}

:root[data-theme="dark"] {
    --bg-primary: #090d16;
    --bg-surface: rgba(15, 23, 42, 0.65);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.06);
    --border-stroke: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.4);
    --primary: #60a5fa;
    --primary-hover: #93c5fd;
    --primary-light: rgba(96, 165, 250, 0.15);
    --accent: #34d399;
    --gradient-1: linear-gradient(135deg, #60a5fa 0%, #c084fc 100%);
    --glass-blur: 20px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: background-color 0.4s ease, border-color 0.4s ease, color 0.3s ease, box-shadow 0.4s ease;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Beautiful Floating Blur Background Blobs */
.glass-bg {
    position: fixed;
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0) 70%);
    z-index: -1;
    pointer-events: none;
    animation: float 20s infinite alternate;
}

.glass-bg-2 {
    position: fixed;
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.12) 0%, rgba(236, 72, 153, 0) 70%);
    z-index: -1;
    pointer-events: none;
    animation: float 25s infinite alternate-reverse;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(10%, 10%) scale(1.1); }
}

/* Header design */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2.5rem;
    background: var(--bg-surface);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 30px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-icon {
    width: 28px;
    height: 28px;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

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

/* Gorgeous Theme Toggle Button */
.theme-toggle-btn {
    background: var(--primary-light);
    border: 1px solid var(--border-stroke);
    padding: 0.6rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: var(--primary);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.theme-toggle-btn:hover {
    transform: scale(1.1) rotate(5deg);
    background: var(--primary);
    color: #ffffff;
}

.toggle-icon-wrapper {
    position: relative;
    width: 20px;
    height: 20px;
}

.sun-icon, .moon-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

/* Show/hide icons depending on theme */
:root[data-theme="light"] .sun-icon {
    opacity: 0;
    transform: scale(0) rotate(90deg);
}

:root[data-theme="light"] .moon-icon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

:root[data-theme="dark"] .sun-icon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

:root[data-theme="dark"] .moon-icon {
    opacity: 0;
    transform: scale(0) rotate(-90deg);
}

/* Dashboard Container */
.dashboard-container {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
    flex-grow: 1;
    width: 100%;
}

.welcome-hero {
    margin-bottom: 3rem;
    text-align: center;
}

.gradient-text {
    font-family: 'Outfit', sans-serif;
    font-size: 2.8rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Grid Dashboard Cards */
.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: var(--bg-surface);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.2rem;
    box-shadow: 0 10px 30px var(--shadow-color);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px var(--shadow-color);
    border-color: var(--primary);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    background: var(--primary-light);
    color: var(--primary);
}

.badge.pulse::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--accent);
    margin-right: 6px;
    vertical-align: middle;
    animation: pulse-ring 1.5s infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

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

/* Buttons and Interactivity */
.primary-btn {
    background: var(--gradient-1);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.primary-btn:hover {
    opacity: 0.95;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.primary-btn:hover .btn-arrow {
    transform: translateX(4px);
}

.btn-arrow {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

/* Profile Card Styling */
.profile-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
    color: #ffffff;
    box-shadow: 0 4px 15px var(--shadow-color);
}

.profile-info h3 {
    font-size: 1.15rem;
    font-weight: 600;
}

.profile-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.divider {
    height: 1px;
    background: var(--border-color);
    margin: 1.2rem 0;
}

.profile-details {
    list-style: none;
}

.profile-details li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
}

.detail-label {
    color: var(--text-secondary);
}

.detail-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* Info Card features list */
.features-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.feature-icon {
    font-size: 1.5rem;
    padding: 0.5rem;
    background: var(--primary-light);
    border-radius: 12px;
}

.feature-item h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.feature-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Footer style */
.app-footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-surface);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

/* Responsive adjustment */
@media (max-width: 768px) {
    .app-header {
        padding: 1rem 1.5rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        width: 100%;
        justify-content: center;
    }
    
    .welcome-hero h1 {
        font-size: 2.2rem;
    }
}