 :root {
     --ui-white: rgba(255, 255, 255, 0.85);
     --ui-glass: rgba(255, 255, 255, 0.4);
     --ui-glass-hover: rgba(255, 255, 255, 0.6);
     --ui-border: rgba(255, 255, 255, 0.6);
     --ui-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
     --text-main: #334155;
     --text-muted: #64748b;
     --accent-blue: #3b82f6;
     --accent-pink: #f472b6;
     --accent-pink-glow: 0 0 10px rgba(244, 114, 182, 0.6);
     --font-main: 'Nunito', sans-serif;
     --font-display: 'M PLUS Rounded 1c', sans-serif;
 }

 * {
     margin: 0;
     padding: 0;
     box-sizing: border-box;
     user-select: none;
     /* Prevents text selection to feel more like an app */
     -webkit-user-drag: none;
 }

 body,
 html {
     width: 100%;
     height: 100%;
     overflow: hidden;
     background-color: #0f172a;
     font-family: var(--font-main);
     color: var(--text-main);
 }

 #app {
     position: relative;
     width: 100vw;
     height: 100vh;
     overflow: hidden;
     perspective: 1000px;
 }

 /* Background Layer */
 .bg-layer {
     position: absolute;
     top: -5%;
     left: -5%;
     width: 110%;
     height: 110%;
     /* Using a high quality aesthetic anime-style classroom/scenery placeholder */
     background-image: url('https://images.unsplash.com/photo-1580136608260-4eb11f4b24fe?q=80&w=2574&auto=format&fit=crop');
     background-size: cover;
     background-position: center;
     filter: saturate(1.2) contrast(1.1) brightness(1.05);
     transition: transform 0.1s ease-out;
     z-index: 1;
 }

 /* Subtle Light Overlay */
 .bg-overlay {
     position: absolute;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(0, 0, 0, 0.1) 100%);
     z-index: 2;
 }

 /* Floating Particles */
 #particles {
     position: absolute;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     z-index: 3;
     pointer-events: none;
 }

 .particle {
     position: absolute;
     background: white;
     border-radius: 50%;
     opacity: 0.4;
     animation: float-up linear infinite;
 }

 @keyframes float-up {
     0% {
         transform: translateY(100vh) scale(0);
         opacity: 0;
     }

     10% {
         opacity: 0.6;
     }

     90% {
         opacity: 0.6;
     }

     100% {
         transform: translateY(-10vh) scale(1.5);
         opacity: 0;
     }
 }

 .character-layer {
     position: absolute;
     bottom: -5%;
     left: 15%;
     height: 95vh;
     width: auto;
     aspect-ratio: 3/4;
     z-index: 4;
     transition: transform 0.1s ease-out;
     display: flex;
     align-items: center;
     justify-content: center;
     /* Placeholder styling to show where the user's PNG goes */
     background: linear-gradient(to top, rgba(255, 255, 255, 0.1), transparent);
     border: 2px dashed rgba(255, 255, 255, 0.3);
     border-radius: 20px;
     backdrop-filter: blur(2px);
 }

 .character-layer::after {
     content: "Insert Character\nSprite Here (.PNG)";
     white-space: pre-wrap;
     text-align: center;
     color: rgba(255, 255, 255, 0.8);
     font-family: var(--font-display);
     font-weight: 700;
     font-size: 1.5rem;
     text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
 }

 /* Base UI Layer (Pointer events none so you can click through empty spaces) */
 .ui-layer {
     position: absolute;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     z-index: 10;
     pointer-events: none;
     display: flex;
     flex-direction: column;
     justify-content: space-between;
 }

 /* Common Glassmorphism Class */
 .glass-panel {
     background: var(--ui-glass);
     backdrop-filter: blur(12px);
     -webkit-backdrop-filter: blur(12px);
     border: 1px solid var(--ui-border);
     box-shadow: var(--ui-shadow);
     pointer-events: auto;
     transition: all 0.2s ease;
 }

 .top-bar {
     padding: 20px 30px;
     display: flex;
     justify-content: space-between;
     align-items: flex-start;
     width: 100%;
 }

 .logo-area {
     pointer-events: auto;
     display: flex;
     flex-direction: column;
     text-shadow: 0 2px 10px rgba(255, 255, 255, 0.8);
 }

 .logo-title {
     font-family: var(--font-display);
     font-weight: 800;
     font-size: 2.5rem;
     color: white;
     line-height: 1;
     letter-spacing: -1px;
     -webkit-text-stroke: 1px rgba(0, 0, 0, 0.1);
 }

 .logo-subtitle {
     font-size: 1.5rem;
     color: var(--accent-blue);
     font-weight: 800;
     background: white;
     padding: 2px 10px;
     border-radius: 10px;
     display: inline-block;
     margin-top: 7px;
     box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
 }

 .metrics-container {
     display: flex;
     gap: 15px;
 }

 .metric-pill {
     display: flex;
     align-items: center;
     gap: 10px;
     background: var(--ui-white);
     padding: 8px 16px;
     border-radius: 50px;
     border: 2px solid white;
     box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
     font-weight: 700;
     font-size: 1.1rem;
     pointer-events: auto;
     cursor: pointer;
     transition: transform 0.2s;
 }

 .metric-pill:hover {
     transform: translateY(-2px) scale(1.02);
 }

 .metric-pill i {
     font-size: 1.3rem;
     color: var(--accent-blue);
 }

 .metric-add {
     background: #f1f5f9;
     border-radius: 50%;
     width: 24px;
     height: 24px;
     display: flex;
     align-items: center;
     justify-content: center;
     color: var(--text-muted);
     font-size: 0.9rem;
     margin-left: 5px;
     transition: all 0.2s;
 }

 .metric-pill:hover .metric-add {
     background: var(--accent-blue);
     color: white;
 }

 .middle-section {
     display: flex;
     flex: 1;
     align-items: center;
     padding: 0 30px;
 }

 .left-menu {
     display: flex;
     flex-direction: column;
     gap: 20px;
 }

 .action-btn {
     position: relative;
     width: 80px;
     height: 80px;
     border-radius: 20px;
     display: flex;
     flex-direction: column;
     align-items: center;
     justify-content: center;
     gap: 5px;
     cursor: pointer;
     color: var(--text-main);
     font-family: var(--font-display);
     font-weight: 700;
     font-size: 0.9rem;
 }

 .action-btn:hover {
     background: var(--ui-glass-hover);
     transform: scale(1.05);
     border-color: white;
 }

 .action-btn i {
     font-size: 2rem;
     color: var(--accent-blue);
 }

 .notification-bubble {
     position: absolute;
     top: -5px;
     right: -5px;
     background: var(--accent-pink);
     color: white;
     width: 24px;
     height: 24px;
     border-radius: 50%;
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 0.8rem;
     font-weight: 800;
     box-shadow: var(--accent-pink-glow);
     border: 2px solid white;
     animation: pulse 2s infinite;
 }

 @keyframes pulse {
     0% {
         transform: scale(1);
     }

     50% {
         transform: scale(1.1);
     }

     100% {
         transform: scale(1);
     }
 }

 .bottom-dock {
     width: 100%;
     padding: 20px 40px;
     background: linear-gradient(to top, rgba(255, 255, 255, 0.5), transparent);
     backdrop-filter: blur(8px);
     -webkit-backdrop-filter: blur(8px);
     border-top: 1px solid rgba(255, 255, 255, 0.4);
     display: flex;
     justify-content: center;
     pointer-events: auto;
 }

 .nav-grid {
     display: flex;
     gap: 15px;
     max-width: 1000px;
     width: 100%;
     justify-content: space-between;
 }

 .nav-item {
     flex: 1;
     background: var(--ui-white);
     border: 2px solid white;
     border-radius: 16px;
     height: 70px;
     display: flex;
     flex-direction: column;
     align-items: center;
     justify-content: center;
     cursor: pointer;
     transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
     box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
     position: relative;
     overflow: hidden;
 }

 .nav-item::before {
     content: '';
     position: absolute;
     top: 0;
     left: 0;
     width: 100%;
     height: 4px;
     background: var(--accent-blue);
     transform: scaleX(0);
     transition: transform 0.3s ease;
     transform-origin: center;
 }

 .nav-item:hover,
 .nav-item.active {
     transform: translateY(-10px);
     box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
 }

 .nav-item:hover::before,
 .nav-item.active::before {
     transform: scaleX(1);
 }

 .nav-item i {
     font-size: 1.5rem;
     color: var(--text-muted);
     margin-bottom: 2px;
     transition: color 0.2s;
 }

 .nav-item span {
     font-family: var(--font-display);
     font-weight: 700;
     font-size: 0.9rem;
     color: var(--text-main);
 }

 .nav-item:hover i,
 .nav-item.active i {
     color: var(--accent-blue);
 }

 /* Highlight specific nav items (like Home/Main) */
 .nav-item.primary {
     background: var(--accent-blue);
     border-color: var(--accent-blue);
 }

 .nav-item.primary i,
 .nav-item.primary span {
     color: white;
 }

 .nav-item.primary::before {
     display: none;
 }

 .nav-item.primary:hover {
     box-shadow: 0 10px 20px rgba(59, 130, 246, 0.4);
 }

 .modal-overlay {
     position: absolute;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     background: rgba(0, 0, 0, 0.4);
     backdrop-filter: blur(5px);
     z-index: 100;
     display: flex;
     align-items: center;
     justify-content: center;
     opacity: 0;
     pointer-events: none;
     transition: opacity 0.3s ease;
 }

 .modal-overlay.active {
     opacity: 1;
     pointer-events: auto;
 }

 .modal-content {
     background: rgba(255, 255, 255, 0.9);
     border: 1px solid white;
     border-radius: 24px;
     width: 80%;
     max-width: 900px;
     height: 70%;
     max-height: 600px;
     box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
     transform: scale(0.95) translateY(20px);
     transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
     display: flex;
     flex-direction: column;
     overflow: hidden;
 }

 .modal-overlay.active .modal-content {
     transform: scale(1) translateY(0);
 }

 .modal-header {
     padding: 20px 30px;
     border-bottom: 2px solid #e2e8f0;
     display: flex;
     justify-content: space-between;
     align-items: center;
     background: white;
 }

 .modal-title {
     font-family: var(--font-display);
     font-size: 1.5rem;
     font-weight: 800;
     color: var(--accent-blue);
     display: flex;
     align-items: center;
     gap: 10px;
 }

 .close-btn {
     background: #f1f5f9;
     border: none;
     width: 40px;
     height: 40px;
     border-radius: 50%;
     display: flex;
     align-items: center;
     justify-content: center;
     cursor: pointer;
     font-size: 1.2rem;
     color: var(--text-main);
     transition: all 0.2s;
 }

 .close-btn:hover {
     background: #ef4444;
     color: white;
     transform: rotate(90deg);
 }

 .modal-body {
     padding: 30px;
     overflow-y: auto;
     flex: 1;
 }

 /* Mock Content Styles for Modals */
 .project-grid {
     display: grid;
     grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
     gap: 20px;
 }

 .project-card {
     background: #f8fafc;
     border: 2px solid #e2e8f0;
     border-radius: 16px;
     padding: 20px;
     transition: all 0.2s;
     cursor: pointer;
 }

 .project-card:hover {
     border-color: var(--accent-blue);
     transform: translateY(-5px);
     box-shadow: 0 10px 20px rgba(59, 130, 246, 0.1);
 }

 .project-card h3 {
     font-family: var(--font-display);
     margin-bottom: 10px;
     color: var(--text-main);
 }

 .project-card p {
     font-size: 0.9rem;
     color: var(--text-muted);
 }

 .tag {
     display: inline-block;
     padding: 4px 8px;
     background: #e0f2fe;
     color: #0284c7;
     border-radius: 8px;
     font-size: 0.75rem;
     font-weight: 700;
     margin-top: 10px;
 }

 @media (max-width: 768px) {
     .nav-grid {
         flex-wrap: wrap;
         gap: 10px;
     }

     .nav-item {
         min-width: 30%;
         height: 60px;
     }

     .nav-item span {
         font-size: 0.75rem;
     }

     .character-layer {
         left: -10%;
         height: 80vh;
     }

     .logo-title {
         font-size: 1.8rem;
     }

     .metrics-container {
         flex-direction: column;
         gap: 10px;
     }
 }
 /* =========================================================
   Glassmorphic Bottom Dock & Navigation
========================================================= */

.bottom-dock {
    width: 100%;
    padding: 18px 40px;
    /* Soft frosted glass gradient across the dock bar */
    background: linear-gradient(
        to top,
        rgba(255, 255, 255, 0.35) 0%,
        rgba(255, 255, 255, 0.15) 100%
    );
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 -8px 32px rgba(31, 38, 135, 0.08);
    display: flex;
    justify-content: center;
    pointer-events: auto;
}

.nav-grid {
    display: flex;
    gap: 15px;
    max-width: 1000px;
    width: 100%;
    justify-content: space-between;
}

/* Glass Base for All Nav Items */
.nav-item {
    flex: 1;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 18px;
    height: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Specular rim light (inset) + soft drop shadow */
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.06),
        inset 0 1px 1px rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 3px;
    background: var(--accent-blue);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: center;
}

.nav-item:hover, 
.nav-item.active {
    background: rgba(255, 255, 255, 0.55);
    border-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-8px);
    box-shadow: 
        0 14px 28px rgba(31, 38, 135, 0.12),
        inset 0 1px 2px rgba(255, 255, 255, 0.9);
}

.nav-item:hover::before, 
.nav-item.active::before {
    transform: scaleX(1);
}

.nav-item i {
    font-size: 1.4rem;
    color: var(--text-muted);
    margin-bottom: 3px;
    transition: color 0.2s, transform 0.2s;
}

.nav-item span {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-main);
    transition: color 0.2s;
}

.nav-item:hover i, 
.nav-item.active i {
    color: var(--accent-blue);
    transform: scale(1.1);
}

/* Glassy Highlighted "Home / Main" Item */
.nav-item.primary {
    /* Colored translucent glass tint */
    background: linear-gradient(
        135deg,
        rgba(59, 130, 246, 0.35) 0%,
        rgba(37, 99, 235, 0.2) 100%
    );
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-top: 1.5px solid rgba(255, 255, 255, 0.9); /* Catch light */
    box-shadow: 
        0 8px 25px rgba(59, 130, 246, 0.25),
        inset 0 1px 1px rgba(255, 255, 255, 0.8),
        inset 0 -1px 2px rgba(59, 130, 246, 0.3);
}

.nav-item.primary i {
    color: #1e40af; /* Deeper blue icon for contrast over glass */
}

.nav-item.primary span {
    color: #1e3a8a;
    font-weight: 800;
}

.nav-item.primary::before { 
    display: none; 
}

.nav-item.primary:hover {
    background: linear-gradient(
        135deg,
        rgba(59, 130, 246, 0.5) 0%,
        rgba(37, 99, 235, 0.35) 100%
    );
    border-color: rgba(255, 255, 255, 0.95);
    box-shadow: 
        0 14px 30px rgba(59, 130, 246, 0.38),
        inset 0 1px 2px rgba(255, 255, 255, 1);
}

.nav-item.primary:hover i {
    color: #1d4ed8;
}

/* The 160% Maximum Overdrive Scale for 1440p Monitors */
@media (min-width: 1440px) {
    /* Logo scaling */
    .logo-title { font-size: 4rem; }
    .logo-subtitle { font-size: 2.4rem; margin-top: 12px; }
    
    /* Top stats scaling */
    .metric-pill { font-size: 1.75rem; padding: 13px 26px; }
    .metric-pill i { font-size: 2.1rem; }
    .metric-add { width: 38px; height: 38px; font-size: 1.4rem; }
    
    /* Left side buttons scaling */
    .action-btn { width: 128px; height: 128px; font-size: 1.45rem; gap: 10px; }
    .action-btn i { font-size: 3.2rem; }
    .notification-bubble { width: 38px; height: 38px; font-size: 1.3rem; top: -12px; right: -12px; border-width: 3px; }
    
    /* Bottom dock scaling */
    .nav-item { height: 112px; border-radius: 26px; }
    .nav-item i { font-size: 2.4rem; margin-bottom: 8px; }
    .nav-item span { font-size: 1.4rem; }

    /* Modal (Popup) scaling */
    .modal-title { font-size: 2.4rem; }
    .close-btn { width: 64px; height: 64px; font-size: 1.9rem; }
    .project-card h3 { font-size: 1.8rem; margin-bottom: 16px; }
    .project-card p { font-size: 1.45rem; }
    .tag { font-size: 1.2rem; padding: 7px 14px; margin-top: 16px; }
}