:root {
    /* Set your wallpaper image filename here */
    --wallpaper-url: url('assets/wallpaper.jpg');
    --mac-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  }
  
  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  body {
    font-family: var(--mac-font);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    background: var(--wallpaper-url) center/cover no-repeat;
    user-select: none;
  }
  
  /* --- Top Menu Bar --- */
  .menu-bar {
    height: 28px;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(25px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    font-size: 13px;
    color: #000;
    font-weight: 500;
    position: relative;
    z-index: 10000 !important; /* Menu stays above all desktop items */
  }
  
  .menu-left, .menu-right {
    display: flex;
    align-items: center;
    gap: 16px;
  }
  
  .apple-icon {
    font-size: 16px;
    cursor: pointer;
  }
  
  /* --- Desktop Layout --- */
  .desktop {
    position: relative;
    height: calc(100vh - 28px - 90px);
    padding: 20px;
    display: flex;
    justify-content: space-between;
  }
  
  /* --- Desktop Widgets --- */
  .widgets-container {
    display: flex;
    gap: 16px;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Let clicks pass through empty spaces */
  }
  
  .widget {
    width: 140px;
    height: 140px;
    border-radius: 24px;
    background: rgba(30, 30, 30, 0.65);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    position: absolute;
    pointer-events: auto; /* Re-enable pointer for widgets */
    cursor: grab;
    user-select: none;
    z-index: 10;
  }
  .widget:active {
    cursor: grabbing;
  }
  /* Analog Clock Widget */
  .clock-face {
    width: 108px;
    height: 108px;
    border-radius: 50%;
    background: #ffffff;
    position: relative;
    box-shadow: inset 0 0 4px rgba(0,0,0,0.1);
  }
  
  .num {
    position: absolute;
    font-size: 11px;
    font-weight: 700;
    color: #1d1d1f;
    width: 14px;
    height: 14px;
    text-align: center;
    line-height: 14px;
  }
  /* Positioning Digits around 108px Circle */
    .num-12 { top: 4px; left: 47px; }
    .num-1  { top: 10px; right: 26px; }
    .num-2  { top: 26px; right: 10px; }
    .num-3  { top: 47px; right: 4px; }
    .num-4  { bottom: 26px; right: 10px; }
    .num-5  { bottom: 10px; right: 26px; }
    .num-6  { bottom: 4px; left: 47px; }
    .num-7  { bottom: 10px; left: 26px; }
    .num-8  { bottom: 26px; left: 10px; }
    .num-9  { top: 47px; left: 4px; }
    .num-10 { top: 26px; left: 10px; }
    .num-11 { top: 10px; left: 26px; }
  .hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: bottom center;
    background: #1e1e1e;
    border-radius: 4px;
  }
  .hand.hour { width: 4px; height: 28px; margin-left: -2px; }
  .hand.minute { width: 3px; height: 38px; margin-left: -1.5px; }
  .hand.second { width: 1.5px; height: 42px; margin-left: -0.75px; background: #ff9500; }
  .center-dot {
    position: absolute;
    top: 50%; left: 50%;
    width: 8px; height: 8px;
    margin: -4px 0 0 -4px;
    background: #ff9500;
    border-radius: 50%;
  }
  
  /* Calendar Widget */
  .calendar-widget {
    font-weight: 600;
  }
  .cal-day { color: #ff3b30; font-size: 14px; text-transform: uppercase; }
  .cal-month { color: #8e8e93; font-size: 14px; margin-top: -2px; }
  .cal-date { font-size: 54px; font-weight: 300; line-height: 1; }
  
  /* --- Desktop Icons Layout --- */
.desktop-icons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Let clicks pass through empty background */
  }
  
  .desktop-icon {
    position: absolute;
    pointer-events: auto; /* Re-enable pointer events for icons */
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    cursor: grab;
    color: white;
    font-size: 12px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    user-select: none;
    z-index: 20;
  }
  
  .desktop-icon:active {
    cursor: grabbing;
  }
  
  .mac-folder-icon {
    width: 48px;
    height: 40px;
    background: #50a2e8;
    border-radius: 4px 10px 4px 4px;
    position: relative;
    box-shadow: inset 0 -2px 4px rgba(0,0,0,0.2), 0 4px 8px rgba(0,0,0,0.3);
    margin-bottom: 6px;
  }
  .mac-folder-icon::before {
    content: '';
    position: absolute;
    top: -6px; left: 0;
    width: 20px; height: 8px;
    background: #50a2e8;
    border-radius: 4px 4px 0 0;
  }
  
  .mac-file-icon {
    font-size: 38px;
    margin-bottom: 2px;
  }
  
  /* --- Finder Windows --- */
  /* --- Resizable macOS Window --- */
  .mac-window {
    position: absolute;
    top: 80px;
    left: 250px;
    
    /* Initial dimensions */
    width: 650px;
    height: 560px;
    
    /* Minimum & Maximum resize boundaries */
    min-width: 320px;
    min-height: 280px;
    max-width: 95vw;
    max-height: 85vh;
    
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(30px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    
    /* Flexbox keeps header fixed while body grows */
    display: flex;
    flex-direction: column;
    
    /* Enables native browser drag-to-resize in bottom-right corner */
    resize: both;
    overflow: auto;
  }
  /* --- Optional: Maximized Window State --- */
.mac-window.maximized {
    top: 36px !important;
    left: 12px !important;
    width: calc(100vw - 24px) !important;
    height: calc(100vh - 140px) !important;
    resize: none; /* Disables manual resize while maximized */
  }
  .window-header {
    height: 36px;
    flex-shrink: 0; /* Keeps header fixed at the top */
    background: rgba(235, 235, 235, 0.6);
    display: flex;
    align-items: center;
    padding: 0 12px;
    position: relative;
    cursor: move;
  }
  
  .traffic-lights {
    display: flex;
    gap: 8px;
  }
  .traffic-lights span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
  }
  .traffic-lights .close { background: #ff5f56; }
  .traffic-lights .minimize { background: #ffbd2e; }
  .traffic-lights .maximize { background: #27c93f; }
  
  .window-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    font-weight: 600;
    color: #444;
  }
  
  .window-body {
    flex-grow: 1; /* Fills remaining window height */
    padding: 20px;
    color: #222;
    overflow-y: auto; /* Adds a clean scrollbar if resized very small */
  }
  
  .hidden { display: none !important; }
  
  /* --- Floating Glass Dock --- */
  .dock-container {
    position: fixed;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
  }
  
  .dock {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(30px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 8px 12px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
  }
  
  .dock-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
  }
  
  .dock-item:hover {
    transform: scale(1.25) translateY(-8px);
  }
  
  .dock-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 26px;
    background: rgba(255,255,255,0.4);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  }
  
  .dock-divider {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.3);
  }
  
  .dot {
    width: 4px;
    height: 4px;
    background: #333;
    border-radius: 50%;
    position: absolute;
    bottom: -6px;
  }

  /* --- Custom VG Brand Menu --- */
.brand-menu-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 6px;
    transition: background 0.15s ease;
  }
  
  .brand-menu-wrapper:hover,
  .brand-menu-wrapper.active {
    background: rgba(0, 0, 0, 0.1);
  }
  
  /* Modern Gradient Monogram Badge */
  .vg-logo {
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #007aff, #5856d6);
    color: white;
    font-weight: 800;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  }
  
  .brand-name {
    font-weight: 600;
    font-size: 13px;
    color: #1d1d1f;
  }
  .mac-dropdown span {
    display: inline-block !important;
  }
  /* Translucent Dropdown Menu */
  .mac-dropdown {
    position: absolute;
    top: 30px;
    left: 0;
    width: 210px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    padding: 5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 10001 !important; /* Dropdown renders on top of widgets */
    display: flex;
    flex-direction: column;
  }
  
  .dropdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    font-size: 12px;
    color: #1d1d1f;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 400;
  }
  
  .dropdown-item:hover {
    background: #007aff;
    color: white;
  }
  
  .dropdown-item:hover .shortcut {
    color: rgba(255, 255, 255, 0.8);
  }
  
  .dropdown-item.disabled {
    color: #8e8e93;
    cursor: default;
  }
  
  .dropdown-item.disabled:hover {
    background: transparent;
    color: #8e8e93;
  }
  
  .shortcut {
    font-size: 11px;
    color: #8e8e93;
  }
  
  .dropdown-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 4px 0;
  }
  /* --- macOS Contact Card Styling --- */
.contact-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
  }
  
  .contact-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #34c759, #30b0c7);
    color: white;
    font-weight: 800;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.3);
  }
  
  .contact-meta h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1d1d1f;
  }
  
  .contact-meta p {
    margin: 2px 0 6px 0;
    font-size: 13px;
    color: #666;
  }
  
  .contact-status-badge {
    font-size: 11px;
    font-weight: 600;
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
  }
  
  .mac-divider {
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin: 14px 0;
  }
  
  /* Action Buttons */
  .contact-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
  }
  
  .action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.6);
    color: #1d1d1f;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
  }
  
  .action-btn:hover {
    background: rgba(0, 0, 0, 0.05);
  }
  
  .action-btn.primary {
    background: #007aff;
    color: white;
    border: none;
  }
  
  .action-btn.primary:hover {
    background: #0062cc;
  }
  
  /* Links List */
  .section-subtitle {
    font-size: 12px;
    font-weight: 600;
    color: #8e8e93;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 10px 0;
  }
  
  .contact-link-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
    margin-bottom: 4px;
  }
  
  .contact-link-row:hover {
    background: rgba(0, 122, 255, 0.08);
  }
  
  .link-icon-bg {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
  }
  
  .github-bg { background: #24292e; }
  .linkedin-bg { background: #0077b5; }
  .twitter-bg { background: #1da1f2; }
  
  .link-details {
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  
  .link-title {
    font-size: 13px;
    font-weight: 600;
    color: #1d1d1f;
  }
  
  .link-sub {
    font-size: 11px;
    color: #8e8e93;
  }
  
  .external-arrow {
    color: #c7c7cc;
    font-weight: bold;
  }
  /* Custom GitHub Dock Icon Styling */
.github-icon {
    background: #24292e !important; 
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .github-icon svg {
    transition: transform 0.2s ease;
  }
  
  .dock-item:hover .github-icon svg {
    transform: scale(1.1);
  }
  /* Custom Contact Dock Icon Styling */
.contact-dock-icon {
    background: linear-gradient(135deg, #34c759, #30b0c7) !important; /* macOS signature green gradient */
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .contact-dock-icon svg {
    transition: transform 0.2s ease;
  }
  
  .dock-item:hover .contact-dock-icon svg {
    transform: scale(1.1);
  }

  /* Custom About Me Dock Icon Styling */
.about-dock-icon {
    background: linear-gradient(135deg, #007aff, #5856d6) !important; /* macOS signature Blue/Purple gradient */
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .about-dock-icon svg {
    transition: transform 0.2s ease;
  }
  
  .dock-item:hover .about-dock-icon svg {
    transform: scale(1.1);
  }
  /* --- Generic macOS Desktop App Tiles --- */
.mac-app-icon {
    width: 54px;
    height: 54px;
    border-radius: 12px; /* macOS Squircle corner radius */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    overflow: hidden;
  }
  
  .mac-app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .desktop-icon:hover .mac-app-icon {
    transform: scale(1.06);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  }
  
  /* Specific Gradient for Fullstack Nexus */
  .nexus-icon {
    background: transparent;
    box-shadow: none; /* Uses the SVG's natural background */
  }

  /* Keeps desktop icon labels on a single line */
.desktop-icon span {
    white-space: nowrap; /* Prevents text from wrapping to the next line */
    font-size: 11px;
    font-weight: 500;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); /* Ensures text stands out against wallpapers */
    margin-top: 6px;
    text-align: center;
  }

  /* --- Projects Grid & Cards Styling --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
  }
  
  .project-card {
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  }
  
  .project-card:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  }
  
  .project-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
  }
  
  .project-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
  }
  
  .nexus-bg { background: linear-gradient(135deg, #4f46e5, #9333ea); }
  .ai-bg { background: linear-gradient(135deg, #007aff, #5856d6); }
  .default-bg { background: linear-gradient(135deg, #34c759, #30b0c7); }
  
  .project-title-area {
    flex-grow: 1;
  }
  
  .project-title-area h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #1d1d1f;
  }
  
  .project-category {
    font-size: 11px;
    color: #8e8e93;
  }
  
  /* Badges */
  .project-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 8px;
    text-transform: uppercase;
  }
  
  .badge-green { background: rgba(52, 199, 89, 0.15); color: #28a745; }
  .badge-purple { background: rgba(88, 86, 214, 0.15); color: #5856d6; }
  .badge-blue { background: rgba(0, 122, 255, 0.15); color: #007aff; }
  
  /* Description */
  .project-description {
    font-size: 12px;
    line-height: 1.45;
    color: #444;
    margin: 0 0 12px 0;
  }
  
  /* Tech Tags */
  .project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 14px;
  }
  
  .ptag {
    background: rgba(0, 0, 0, 0.05);
    color: #555;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
  }
  
  /* Action Buttons */
  .project-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
  }
  
  .proj-btn {
    font-size: 11px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
  }
  
  .proj-btn.primary {
    background: #007aff;
    color: white;
  }
  
  .proj-btn.primary:hover {
    background: #0062cc;
  }
  
  .proj-btn.secondary {
    background: rgba(0, 0, 0, 0.06);
    color: #333;
  }
  
  .proj-btn.secondary:hover {
    background: rgba(0, 0, 0, 0.12);
  }

  /* Optional Video Demo Button */
.proj-btn.demo {
    background: rgba(255, 59, 48, 0.12);
    color: #ff3b30;
    border: 1px solid rgba(255, 59, 48, 0.2);
  }
  
  .proj-btn.demo:hover {
    background: #ff3b30;
    color: #ffffff;
  }

  .java-bg {
    background: linear-gradient(135deg, #f89820, #e76f51); /* Warm Java Orange Gradient */
  }
  .calci-bg {
    background: linear-gradient(135deg, #1e293b, #0f172a); /* Terminal Dark Slate Gradient */
  }

  /* Style for PNG/image icons inside project cards */
.project-icon-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
  }

  .snapread-bg {
    background: transparent;
  }

  /* ==========================================
   📱 Mobile & Tablet Responsive Adjustments
   ========================================== */

@media (max-width: 768px) {

  /* 1. Simplify Top Menu Bar */
  .menu-left > span:not(.app-title) {
    display: none;
  }

  .menu-bar {
    padding: 0 10px;
  }

  /* 2. Reposition Desktop Icons into a Mobile-Friendly Top Grid */
  .desktop-icons {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 16px;
    padding: 10px;
    top: 0 !important;
    right: 0 !important;
  }

  .desktop-icon {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    width: 72px;
  }

  /* 3. Hide or Adjust Widgets on Small Screens */
  .widgets-container {
    display: none; /* Hides desktop widgets on mobile to prevent clutter */
  }

  /* 4. Convert macOS Windows to Touch Modals */
  .mac-window {
    position: fixed !important;
    top: 40px !important;
    left: 3vw !important;
    width: 94vw !important;
    height: 78vh !important;
    max-width: 100vw !important;
    max-height: 85vh !important;
    resize: none !important; /* Disable manual drag-resize on touch screens */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    z-index: 1000 !important;
  }

  .window-body {
    padding: 14px;
    -webkit-overflow-scrolling: touch;
  }

  /* 5. Projects Window Grid: Single-Column Stack */
  .projects-grid {
    grid-template-columns: 1fr; /* Single column on phones */
    gap: 12px;
  }

  .project-actions {
    flex-wrap: wrap; /* Wraps action buttons nicely on narrow screens */
  }

  .proj-btn {
    flex: 1;
    justify-content: center;
    text-align: center;
  }

  /* 6. QuickTime Video Player Window */
  #video-window {
    width: 94vw !important;
    left: 3vw !important;
    top: 60px !important;
  }

  /* 7. Fit Glassmorphic Dock for Mobile Screens */
  .dock-container {
    bottom: 8px;
    width: auto;
    max-width: 96vw;
  }

  .dock {
    padding: 6px 10px;
    gap: 8px;
  }

  .dock-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
    border-radius: 10px;
  }

  .dock-icon svg {
    width: 22px;
    height: 22px;
  }

  /* Disable dock hover scaling on touch devices to prevent sticky zoom states */
  .dock-item:hover {
    transform: none;
  }
}

/* Extra small devices (portrait phones, < 480px) */
@media (max-width: 480px) {
  .brand-name {
    display: none; /* Show only VG monogram on tiny screens */
  }

  .mac-window {
    height: 82vh !important;
  }
}
/* --- macOS Terminal Dark Theme --- */
.terminal-window {
  background: rgba(24, 24, 27, 0.94) !important;
  color: #f4f4f5;
  font-family: "SF Mono", "Fira Code", Monaco, Consolas, "Courier New", monospace;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.terminal-header {
  background: #27272a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-header .window-title {
  color: #a1a1aa;
}

.terminal-body {
  background: #18181b;
  color: #e4e4e7;
  padding: 16px;
  font-size: 13px;
  line-height: 1.6;
  cursor: text;
}

.term-welcome {
  color: #a1a1aa;
  margin-bottom: 4px;
}

.term-highlight {
  color: #38bdf8;
  font-weight: 600;
}

.terminal-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.prompt {
  color: #4ade80;
  font-weight: 700;
  white-space: nowrap;
}

#terminal-input {
  background: transparent;
  border: none;
  outline: none;
  color: #f4f4f5;
  font-family: inherit;
  font-size: 13px;
  flex-grow: 1;
}

.term-command-row {
  margin-top: 8px;
  margin-bottom: 2px;
}

.term-output-text {
  margin-bottom: 8px;
  white-space: pre-wrap;
  color: #cbd5e1;
}

.term-error {
  color: #f87171;
}

.term-success {
  color: #34d399;
}

.terminal-dock-icon {
  background: #18181b !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* --- macOS Control Center Dropdown --- */
.control-center-popover {
  position: fixed;
  top: 34px;
  right: 12px;
  width: 280px;
  background: rgba(28, 28, 30, 0.78);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  z-index: 10000;
  color: #f4f4f5;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.control-center-popover.hidden {
  display: none;
  opacity: 0;
  transform: translateY(-8px);
}

.cc-header {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cc-section-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 8px;
}

.wallpaper-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wallpaper-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 10px;
  color: #e4e4e7;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  width: 100%;
  text-align: left;
}

.wallpaper-card:hover {
  background: rgba(255, 255, 255, 0.14);
}

.wallpaper-card.active {
  background: rgba(0, 122, 255, 0.25);
  border-color: #007aff;
  color: #ffffff;
}

.wp-preview {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

/* Wallpaper Thumbnail Gradients */
.monterey-dark-thumb {
  background: linear-gradient(135deg, #1e1b4b, #311042, #581c87);
}

.sonoma-light-thumb {
  background: linear-gradient(135deg, #38bdf8, #f43f5e, #fbbf24);
}

.cyber-dark-thumb {
  background: linear-gradient(135deg, #0f172a, #0284c7, #10b981);
}

/* --- Good Reads App Window & Reader Styles --- */

#good-reads-window {
  width: 820px;
  max-width: 92vw;
  height: 520px;
  max-height: 82vh;
  position: absolute;
  top: 70px;
  left: calc(50vw - 410px);
  /* background: rgba(28, 28, 30, 0.92); */
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  z-index: 50;
  /* color: #e4e4e7; */
  background: rgba(246, 246, 246, 0.92);
  color: #1c1c1e;
}

/* Ensure hidden windows never take space or show up */
.mac-window.hidden {
  display: none !important;
}

.reader-app-body {
  display: flex;
  flex: 1;
  width: 100%;
  height: calc(100% - 38px);
  overflow: hidden;
}

/* Sidebar */
.reader-sidebar {
  width: 230px;
  min-width: 200px;
  background: rgba(230, 230, 235, 0.7);
  border-right: 1px solid rgba(0, 0, 0, 0.1);
  padding: 14px 10px;
  overflow-y: auto;
  box-sizing: border-box;
  color: rgba(0, 0, 0, 0.4);
}

.sidebar-category {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #007aff;
  margin-bottom: 10px;
  padding-left: 6px;
}

.file-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: #a1a1aa;
  transition: background 0.15s ease, color 0.15s ease;
  margin-bottom: 4px;
  color: #3a3a3c;
}

.file-item:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #000000;
}

.file-item.active {
  background: #007aff !important;
  color: #ffffff !important;
}

.file-tag {
  font-size: 9px;
  font-family: monospace;
  background: rgba(255, 255, 255, 0.15);
  padding: 2px 5px;
  border-radius: 4px;
  text-transform: uppercase;
}

/* Reading View */
.reader-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px;
  overflow-y: auto;
  background: rgba(10, 10, 12, 0.3);
  box-sizing: border-box;
}

.reader-doc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 16px;
}

.reader-doc-header h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: #ffffff;
}

.doc-badge {
  font-size: 10px;
  font-family: monospace;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

/* Markdown Content Styling */
.markdown-body {
  line-height: 1.6;
  font-size: 14px;
  color: #d4d4d8;
}

.markdown-body h1, .markdown-body h2, .markdown-body h3 {
  color: #ffffff;
  margin-top: 16px;
  margin-bottom: 8px;
}

.markdown-body pre {
  background: #18181b;
  padding: 12px;
  border-radius: 8px;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #38bdf8;
}

.markdown-body code {
  font-family: monospace;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: #f43f5e;
}

.markdown-body blockquote {
  border-left: 3px solid #007aff;
  margin: 0;
  padding-left: 12px;
  color: #a1a1aa;
}

.placeholder-text {
  color: rgba(255, 255, 255, 0.4);
  font-style: italic;
}
.reader-main {
  background: #ffffff;
}

.reader-doc-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.reader-doc-header h2 {
  color: #1c1c1e;
}

.markdown-body {
  color: #2c2c2e;
}

.markdown-body h1, .markdown-body h2, .markdown-body h3 {
  color: #1c1c1e;
}

.markdown-body pre {
  background: #f4f4f5;
  border: 1px solid #e4e4e7;
  color: #09090b;
}

.markdown-body code {
  background: #f1f5f9;
  color: #d97706;
}

/* --- macOS Lock Screen & Idle Screen Saver Styles --- */

.lock-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s ease;
}

.lock-screen.hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.lock-screen-bg {
  position: absolute;
  inset: 0;
  background: rgba(15, 15, 20, 0.45);
  backdrop-filter: blur(45px) brightness(0.75) saturate(140%);
  -webkit-backdrop-filter: blur(45px) brightness(0.75) saturate(140%);
  z-index: 1;
}

.lock-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 82vh;
  width: 100%;
  color: #ffffff;
  text-align: center;
  user-select: none;
}

/* Clock Header */
.lock-clock-area {
  margin-top: 20px;
}

#lock-date {
  font-size: 18px;
  font-weight: 500;
  opacity: 0.9;
  letter-spacing: 0.4px;
}

#lock-time {
  font-size: 82px;
  font-weight: 700;
  letter-spacing: -2px;
  margin-top: -6px;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

/* User Profile & Password Input */
.lock-user-area {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lock-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, #007aff, #5856d6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 800;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  margin-bottom: 12px;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.lock-user-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 0.2px;
}

.lock-input-group {
  position: relative;
  width: 220px;
  display: flex;
  align-items: center;
}

#lock-pass-input {
  width: 100%;
  padding: 8px 36px 8px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  color: #ffffff;
  font-size: 12px;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

#lock-pass-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

#lock-pass-input:focus {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.6);
}

#lock-unlock-btn {
  position: absolute;
  right: 4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: background 0.2s ease, transform 0.1s ease;
}

#lock-unlock-btn:hover {
  background: rgba(255, 255, 255, 0.6);
}

#lock-unlock-btn:active {
  transform: scale(0.92);
}

.lock-hint {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 10px;
}

/* Footer Control Actions */
.lock-footer-actions {
  display: flex;
  gap: 32px;
  margin-bottom: 10px;
}

.lock-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.lock-action-btn:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.lock-action-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.lock-action-btn span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
}
.contact-avatar-img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.2);
}
.lock-avatar-img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  margin-bottom: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
}
.leetcode-bg {
  background: linear-gradient(135deg, #ffa116, #f89b29);
  box-shadow: 0 4px 12px rgba(255, 161, 22, 0.3);
}

/* --- macOS Surprise Me App Icon Styling --- */
/* --- macOS Surprise Me App Icon Styling --- */

.random-app-icon {
  width: 54px;
  height: 54px;
  background: linear-gradient(135deg, #ff9500 0%, #ff2d55 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  box-shadow: 0 4px 14px rgba(255, 45, 85, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}

.dice-emoji {
  display: inline-block;
  font-size: 34px; /* Increased from 24px */
  line-height: 1;
  transform-origin: center center;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.desktop-icon:hover .random-app-icon {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(255, 45, 85, 0.55);
}

.desktop-icon:hover .random-app-icon {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(255, 45, 85, 0.5);
}

/* --- Rolling Dice Animation --- */

.dice-emoji {
  display: inline-block;
  transform-origin: center center;
}

.random-app-icon.rolling {
  animation: appPulse 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}

.random-app-icon.rolling .dice-emoji {
  animation: rollDice 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Keyframes for the dice rotation & jump */
@keyframes rollDice {
  0% {
    transform: scale(1) rotate(0deg) translateY(0);
  }
  20% {
    transform: scale(1.3) rotate(-90deg) translateY(-14px);
  }
  50% {
    transform: scale(1.4) rotate(270deg) translateY(-18px);
  }
  75% {
    transform: scale(1.1) rotate(540deg) translateY(-4px);
  }
  100% {
    transform: scale(1) rotate(720deg) translateY(0);
  }
}

/* Subtle background glow pulse while rolling */
@keyframes appPulse {
  0% {
    box-shadow: 0 4px 12px rgba(255, 45, 85, 0.35);
  }
  50% {
    box-shadow: 0 0 24px rgba(255, 45, 85, 0.8), 0 0 12px rgba(255, 149, 0, 0.6);
  }
  100% {
    box-shadow: 0 4px 12px rgba(255, 45, 85, 0.35);
  }
}

/* --- On-Screen Fullscreen Dice Roll --- */

.dice-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.dice-overlay.visible {
  opacity: 1;
}

.large-screen-dice {
  font-size: 130px;
  line-height: 1;
  user-select: none;
  filter: drop-shadow(0 25px 35px rgba(0, 0, 0, 0.5));
}

.dice-overlay.visible .large-screen-dice {
  animation: tumbleAcrossScreen 1.1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Tumbling & Bouncing Keyframes across screen space */
@keyframes tumbleAcrossScreen {
  0% {
    transform: translate(-35vw, -30vh) scale(0.2) rotate(0deg);
  }
  25% {
    transform: translate(15vw, -15vh) scale(1.4) rotate(420deg);
  }
  55% {
    transform: translate(-10vw, 10vh) scale(1.6) rotate(840deg);
  }
  80% {
    transform: translate(0, -5vh) scale(1.8) rotate(1180deg);
  }
  100% {
    transform: translate(0, 0) scale(1.2) rotate(1440deg);
  }
}

/* --- macOS Help Window Styles --- */

.help-body {
  padding: 18px 20px;
  color: #1d1d1f;
}

.help-hero {
  display: flex;
  align-items: center;
  gap: 14px;
}

.help-hero-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffcc00, #ff9500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(255, 149, 0, 0.35);
  flex-shrink: 0;
}

.help-hero h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #1d1d1f;
}

.help-hero p {
  margin: 2px 0 0 0;
  font-size: 12px;
  color: #666;
}

.help-section-title {
  margin: 12px 0 8px 0;
  font-size: 13px;
  font-weight: 700;
  color: #007aff;
}

/* Shortcuts Grid */
.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.shortcut-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 8px 12px;
  border-radius: 8px;
}

.shortcut-desc {
  font-size: 12px;
  font-weight: 500;
  color: #333;
}

.shortcut-keys kbd {
  background: #ffffff;
  border: 1px solid #d1d1d6;
  border-bottom: 2px solid #b1b1b6;
  border-radius: 4px;
  padding: 2px 6px;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #1d1d1f;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Tips List */
.help-tips-list {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.6;
  color: #444;
}

.help-tips-list code {
  background: rgba(0, 122, 255, 0.1);
  color: #007aff;
  padding: 1px 5px;
  border-radius: 4px;
  font-family: monospace;
}


/* --- macOS Spotlight Search Overlay --- */

.spotlight-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  padding-top: 18vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.spotlight-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.spotlight-card {
  width: 90%;
  max-width: 620px;
  background: rgba(30, 30, 32, 0.85);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: fit-content;
  max-height: 480px;
}

.spotlight-input-wrapper {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.spotlight-search-icon {
  font-size: 18px;
  margin-right: 12px;
  opacity: 0.7;
}

#spotlight-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 18px;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
}

#spotlight-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.spotlight-shortcut-hint {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.1);
  padding: 3px 7px;
  border-radius: 5px;
}

/* Results Area */
.spotlight-results {
  overflow-y: auto;
  max-height: 360px;
  padding: 8px;
}

.spotlight-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  color: #ffffff;
  transition: background 0.15s ease;
}

.spotlight-item:hover, .spotlight-item.selected {
  background: rgba(0, 122, 255, 0.8);
}

.spotlight-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.spotlight-item-icon {
  font-size: 20px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spotlight-item-title {
  font-size: 14px;
  font-weight: 600;
}

.spotlight-item-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 2px;
}

.spotlight-item.selected .spotlight-item-sub {
  color: rgba(255, 255, 255, 0.85);
}

.spotlight-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.8);
}

/* Spotlight Footer */
.spotlight-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
}

.spotlight-footer kbd {
  background: rgba(255, 255, 255, 0.15);
  padding: 1px 4px;
  border-radius: 3px;
  color: #fff;
}


/* --- Menu Bar Action Icons --- */

.menu-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.2);
}

.menu-item svg {
  display: block;
  color: currentColor;
}