/* ===================================
   Base Styles & Background
   =================================== */
body {
    background-color: #1e1e1e;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(97, 222, 42, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(79, 195, 247, 0.03) 0%, transparent 50%);
    background-attachment: fixed;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMDAiIGhlaWdodD0iMzAwIj48ZmlsdGVyIGlkPSJhIiB4PSIwIiB5PSIwIj48ZmVUdXJidWxlbmNlIGJhc2VGcmVxdWVuY3k9Ii43NSIgc3RpdGNoVGlsZXM9InN0aXRjaCIgdHlwZT0iZnJhY3RhbE5vaXNlIi8+PGZlQ29sb3JNYXRyaXggdHlwZT0ic2F0dXJhdGUiIHZhbHVlcz0iMCIvPjwvZmlsdGVyPjxwYXRoIGQ9Ik0wIDBoMzAwdjMwMEgweiIgZmlsdGVyPSJ1cmwoI2EpIiBvcGFjaXR5PSIuMDUiLz48L3N2Zz4=');
    pointer-events: none;
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.04;
    background-image: url('../images/pB.png');
    background-size: 80px 80px;
    background-repeat: repeat;
    background-position: center;
    pointer-events: none;
    z-index: 0;
}

/* ===================================
   Logo Styles
   =================================== */
img {
    opacity: 0;
    -moz-transition: opacity 2s;
    -webkit-transition: opacity 2s;
    -o-transition: opacity 2s;
    transition: opacity 2s;
}

/* ===================================
   Editor Window Chrome
   =================================== */
.editor-window {
    background: #1e1e1e;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    max-width: 1200px;
    margin: 3rem auto;
    border: 1px solid #2d2d30;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.editor-titlebar {
    background: #323233;
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid #1e1e1e;
}

.editor-controls {
    display: flex;
    gap: 0.5rem;
}

.editor-control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.editor-control.close {
    background: #ff5f56;
}

.editor-control.minimize {
    background: #ffbd2e;
}

.editor-control.maximize {
    background: #27c93f;
}

.editor-control:hover {
    filter: brightness(1.2);
    transform: scale(1.1);
}

.editor-filename {
    color: #cccccc;
    font-size: 0.85rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 500;
}

/* ===================================
   Tab Bar
   =================================== */
.editor-tabs {
    background: #252526;
    display: flex;
    border-bottom: 1px solid #1e1e1e;
    overflow-x: auto;
}

.editor-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: #2d2d30;
    border-right: 1px solid #1e1e1e;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    user-select: none;
    text-decoration: none;
    color: inherit;
}

.editor-tab:hover {
    background: #2a2d2e;
}

.editor-tab.active {
    background: #1e1e1e;
    border-bottom: 2px solid #4fc3f7;
}

.editor-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #4fc3f7;
}

.tab-icon {
    font-size: 0.9rem;
}

.tab-name {
    color: #969696;
    font-size: 0.85rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transition: color 0.2s ease;
}

.editor-tab.active .tab-name {
    color: #ffffff;
}

.editor-tab:hover .tab-name {
    color: #cccccc;
}

/* ===================================
   Sidebar & Main Layout
   =================================== */
.editor-main {
    display: flex;
    flex: 1;
    position: relative;
    overflow: hidden;
}

.sidebar-toggle-bar {
    width: 48px;
    background: #2d2d30;
    border-right: 1px solid #1e1e1e;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0;
    cursor: pointer;
    transition: background 0.2s ease;
    flex-shrink: 0;
    z-index: 5;
    position: relative; /* allow absolute positioning of icon */
}

.sidebar-toggle-bar:hover {
    background: #37373d;
}

.sidebar-toggle-icon {
    font-size: 1.5rem;
    /* Keep icon upright and pin to top of the bar */
    writing-mode: initial;
    text-orientation: initial;
    position: absolute;
    top: 0.5rem; /* add a bit of breathing room from the top */
    left: 50%;
    transform: translateX(-50%);
    user-select: none;
    color: #969696;
    transition: color 0.2s ease;
}

.sidebar-toggle-bar:hover .sidebar-toggle-icon {
    color: #cccccc;
}

.sidebar-toggle-label {
    font-size: 0.65rem;
    color: #969696;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    margin-top: 0.5rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: 0.5px;
    user-select: none;
}

.sidebar {
    width: 250px;
    background: #252526;
    border-right: 1px solid #1e1e1e;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.sidebar.collapsed {
    margin-left: -250px;
}

.sidebar-header {
    padding: 0.5rem 0.75rem;
    background: #2d2d30;
    border-bottom: 1px solid #1e1e1e;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-title {
    color: #cccccc;
    font-size: 0.75rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: #969696;
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1rem;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle:hover {
    color: #cccccc;
}

.file-tree {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.file-tree-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    cursor: pointer;
    transition: background 0.2s ease;
    user-select: none;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.file-tree-item:hover {
    background: #2a2d2e;
}

.file-tree-item.active {
    background: #37373d;
}

.file-tree-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #4fc3f7;
}

.file-icon {
    font-size: 0.9rem;
    flex-shrink: 0;
}

.file-name {
    color: #cccccc;
    font-size: 0.85rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transition: color 0.2s ease;
}

.file-tree-item.active .file-name {
    color: #ffffff;
    font-weight: 500;
}

.file-tree-item:hover .file-name {
    color: #ffffff;
}



.editor-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* ===================================
   Code Content Area
   =================================== */
.editor-content {
    background: #1e1e1e;
    min-height: 400px;
    max-height: calc(100vh - 250px);
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
}

.code-file {
    position: relative;
    display: none;
    opacity: 0;
    animation: fadeOut 0.2s ease;
}

.code-file.active {
    display: block;
    opacity: 1;
    animation: fadeIn 0.3s ease;
}

#file-home .visual-preview,
#file-about .visual-preview,
#file-experience .visual-preview,
#file-contact .visual-preview {
  padding: 1.5rem 2rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

#file-home .visual-card,
#file-about .visual-card,
#file-experience .visual-card,
#file-contact .visual-card {
  background: #1e1e1e;
  color: #eaeaea;
  border: 1px solid #2d2d30;
  border-radius: 12px;
  padding: 2rem 2.5rem;
  line-height: 1.65;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  position: relative;
}

#file-home .visual-card h2,
#file-about .visual-card h2,
#file-experience .visual-card h2,
#file-contact .visual-card h2 {
  margin: 0 0 0.75rem 0;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

#file-home .visual-card h3,
#file-about .visual-card h3,
#file-experience .visual-card h3,
#file-contact .visual-card h3 {
  margin: 1.25rem 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 500;
  opacity: 0.95;
}

#file-home .visual-card ul,
#file-about .visual-card ul,
#file-experience .visual-card ul,
#file-contact .visual-card ul {
  margin: 0.5rem 0 1rem 1.5rem;
}

#file-about .visual-card .status {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #2d2d30;
  opacity: 0.9;
}

#file-home .visual-card h2,
#file-about .visual-card h2,
#file-experience .visual-card h2,
#file-contact .visual-card h2 {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

#file-home .visual-card h3,
#file-about .visual-card h3,
#file-experience .visual-card h3,
#file-contact .visual-card h3 {
  color: #e0e0e0;
  font-weight: 500;
}

#file-home .visual-card h3:not(:first-of-type),
#file-about .visual-card h3:not(:first-of-type),
#file-experience .visual-card h3:not(:first-of-type),
#file-contact .visual-card h3:not(:first-of-type) {
  border-top: 1px solid rgba(79, 195, 247, 0.15);
  padding-top: 1rem;
  margin-top: 1.5rem;
}

#file-home .visual-card p,
#file-about .visual-card p,
#file-experience .visual-card p,
#file-contact .visual-card p {
  margin: 0.5rem 0 1rem;
  color: #d4d4d4;
  line-height: 1.7;
}

#file-home .visual-card ul,
#file-about .visual-card ul,
#file-experience .visual-card ul,
#file-contact .visual-card ul {
  list-style: none;
  padding-left: 0;
  margin: 0.75rem 0 1.25rem 0;
}

#file-home .visual-card li,
#file-about .visual-card li,
#file-experience .visual-card li,
#file-contact .visual-card li {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: #d4d4d4;
}

#file-home .visual-card li::before,
#file-about .visual-card li::before,
#file-experience .visual-card li::before,
#file-contact .visual-card li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: #4fc3f7;
  font-size: 0.85em;
}

#file-home .visual-card a,
#file-about .visual-card a,
#file-experience .visual-card a,
#file-contact .visual-card a {
  color: #4fc3f7;
  text-decoration: none;
  transition: all 0.2s ease;
  border-bottom: 1px solid transparent;
}

#file-home .visual-card a:hover,
#file-about .visual-card a:hover,
#file-experience .visual-card a:hover,
#file-contact .visual-card a:hover {
  color: #7dd8ff;
  border-bottom-color: #4fc3f7;
}


.editor-statusbar .status-right .status-item[role="button"] { cursor: pointer; }

/* ===================================
   Logo Integration Options
   =================================== */

.visual-card.logo-badge::after {
  content: '';
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 40px;
  height: 40px;
  background-image: url('../images/pB.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.15;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.visual-card.logo-badge:hover::after {
  opacity: 0.25;
}

.visual-card.logo-watermark::after {
  content: '';
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 60px;
  height: 60px;
  background-image: url('../images/pB.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.08;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.visual-card.logo-watermark:hover::after {
  opacity: 0.15;
}

.visual-card.logo-accent::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  width: 50px;
  height: 50px;
  background-image: url('../images/pB.png');
  background-size: 30px 30px;
  background-repeat: no-repeat;
  background-position: 10px 10px;
  background-color: rgba(79, 195, 247, 0.05);
  border-radius: 12px 0 8px 0;
  border-top: 2px solid rgba(79, 195, 247, 0.3);
  border-left: 2px solid rgba(79, 195, 247, 0.3);
  opacity: 0.8;
  transition: all 0.3s ease;
  pointer-events: none;
}

.visual-card.logo-accent:hover::before {
  background-color: rgba(79, 195, 247, 0.08);
  border-top-color: rgba(79, 195, 247, 0.5);
  border-left-color: rgba(79, 195, 247, 0.5);
}

.visual-card.logo-pattern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../images/pB.png');
  background-size: 80px 80px;
  background-repeat: repeat;
  background-position: center;
  opacity: 0.02;
  transition: opacity 0.3s ease;
  pointer-events: none;
  border-radius: 12px;
  z-index: 0;
}

.visual-card.logo-pattern:hover::before {
  opacity: 0.035;
}

.visual-card.logo-pattern > * {
  position: relative;
  z-index: 1;
}

.visual-card.logo-pattern-diagonal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../images/pB.png');
  background-size: 60px 60px;
  background-repeat: repeat;
  background-position: 0 0;
  opacity: 0.025;
  transition: opacity 0.3s ease;
  pointer-events: none;
  border-radius: 12px;
  z-index: 0;
  transform: rotate(-15deg);
  transform-origin: center;
}

.visual-card.logo-pattern-diagonal:hover::before {
  opacity: 0.04;
}

.visual-card.logo-pattern-diagonal > * {
  position: relative;
  z-index: 1;
}

.visual-card.logo-pattern-large::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../images/pB.png');
  background-size: 120px 120px;
  background-repeat: repeat;
  background-position: center;
  opacity: 0.015;
  transition: opacity 0.3s ease;
  pointer-events: none;
  border-radius: 12px;
  z-index: 0;
}

.visual-card.logo-pattern-large:hover::before {
  opacity: 0.03;
}

.visual-card.logo-pattern-large > * {
  position: relative;
  z-index: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(10px);
    }
}

.code-file pre {
    margin: 0;
    padding: 1.5rem;
}

/* ===================================
   Status Bar
   =================================== */
.editor-statusbar {
    background: #007acc;
    color: #ffffff;
    padding: 0.4rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

.status-left,
.status-right {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.status-item i {
    font-size: 0.85em;
}

/* Progress bar between left and right status items */
.status-progress {
    flex: 1 1 auto;
    height: 3px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
    margin: 0 0.75rem;
    position: relative;
    overflow: hidden;
}
.status-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%; /* set dynamically in future */
    background: rgba(255, 255, 255, 0.55);
    border-radius: 2px;
    transition: width 0.4s ease;
}


/* Hidden by default; only visible while compiling */
.status-progress { display: none; opacity: 0; }
.editor-statusbar.compiling .status-progress { display: block; opacity: 1; transition: opacity 120ms ease; }

/* Optional subtle pulse during compile (not used by default) */
@keyframes statusPulse { 0% { opacity: .55 } 50% { opacity: .7 } 100% { opacity: .55 } }
.editor-statusbar.compiling .status-progress-fill.pulse { animation: statusPulse 800ms ease-in-out infinite; }

/* New content render-in transition */
.code-file.render-in { opacity: 0; transform: translateY(6px) scale(.99); }
.code-file.render-in.rendered { opacity: 1; transform: translateY(0) scale(1); transition: opacity 220ms ease, transform 220ms ease; }

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
  .editor-statusbar.compiling .status-progress { transition: none; }
  .status-progress-fill { transition: none !important; animation: none !important; }
  .code-file.render-in.rendered { transition: none; }
  .status-item.mode-highlight { animation: none !important; }
}

/* Subtle highlight animation for mode toggle on auto-transition */
@keyframes modeHighlight {
  0% {
    background: rgba(79, 195, 247, 0);
    box-shadow: 0 0 0 rgba(79, 195, 247, 0);
  }
  15% {
    background: rgba(79, 195, 247, 0.15);
    box-shadow: 0 0 8px rgba(79, 195, 247, 0.3);
  }
  85% {
    background: rgba(79, 195, 247, 0.15);
    box-shadow: 0 0 8px rgba(79, 195, 247, 0.3);
  }
  100% {
    background: rgba(79, 195, 247, 0);
    box-shadow: 0 0 0 rgba(79, 195, 247, 0);
  }
}

.status-item.mode-highlight {
  animation: modeHighlight 2.5s ease-in-out;
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  margin: -0.25rem -0.5rem;
}


/* ===================================
   Mobile Bottom Navigation
   =================================== */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #252526;
    border-top: 1px solid #3e3e42;
    padding: 0.5rem 0;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.mobile-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    flex: 1;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.mobile-nav-item:active {
    transform: scale(0.95);
}

.mobile-nav-icon {
    font-size: 1.3rem;
    transition: transform 0.2s ease;
}

.mobile-nav-label {
    font-size: 0.65rem;
    color: #969696;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transition: color 0.2s ease;
    font-weight: 500;
}

.mobile-nav-item.active .mobile-nav-icon {
    transform: scale(1.1);
}

.mobile-nav-item.active .mobile-nav-label {
    color: #4fc3f7;
    font-weight: 600;
}

.mobile-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: #4fc3f7;
    border-radius: 0 0 2px 2px;
}

/* ===================================
   Responsive Design
   =================================== */
@media only screen and (max-width: 1024px) {
    .sidebar {
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100%;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.3);
        z-index: 100;
    }

    .sidebar.collapsed {
        transform: translateX(-100%);
    }
    /* Hide left bar and show bottom nav on tablets/phones */
    .sidebar,
    .sidebar-toggle-bar {
        display: none !important;
    }

    .mobile-bottom-nav {
        display: block !important;
    }

    /* Provide space for both fixed bars (status bar ~35px + mobile nav ~73px) */
    .editor-content {
        padding-bottom: 7rem;
    }

    /* Remove body padding on mobile - fixed elements don't need it */
    body {
        padding-bottom: 0;
    }

    /* Optimize status bar for tablets */
    .editor-statusbar {
        font-size: 0.7rem;
        padding: 0.35rem 0.85rem;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        position: fixed;
        bottom: 73px; /* Height of mobile nav */
        left: 0;
        right: 0;
        z-index: 999; /* Below mobile nav (1000) but above content */
    }

}

@media only screen and (max-width: 768px) {
    .editor-window {
        margin: 1rem 0.5rem;
        margin-bottom: 0;
        border-radius: 12px;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

    .editor-titlebar {
        padding: 0.5rem 0.75rem;
    }

    .editor-control {
        width: 10px;
        height: 10px;
    }

    .editor-filename {
        font-size: 0.75rem;
    }

    /* Hide tabs on mobile - use bottom nav instead */
    .editor-tabs {
        display: none;
    }

    .code-file pre {
        padding: 1rem;
        padding-bottom: 2rem;
    }

    /* Hide sidebar and toggle bar completely on mobile */
    .sidebar,
    .sidebar-toggle-bar {
        display: none !important;
    }

    /* Show status bar on mobile/tablet (keeps editor feel) */
    .editor-statusbar {
        display: flex;
        position: fixed;
        bottom: 73px; /* Height of mobile nav */
        left: 0;
        right: 0;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        font-size: 0.65rem;
        padding: 0.35rem 0.75rem;
        z-index: 999; /* Below mobile nav (1000) but above content */
    }

    .status-left,
    .status-right {
        gap: 0.5rem;
    }

    /* Show mobile bottom navigation */
    .mobile-bottom-nav {
        display: block !important;
    }

    /* Add padding to editor content for both fixed bars */
    .editor-content {
        padding-bottom: 7rem;
    }

    /* No body padding needed - navigation is fixed */
    body {
        padding-bottom: 0;
    }

    /* Ensure editor window sits above both bars */
    .editor-window {
        margin-bottom: 0;
        position: relative;
        z-index: 1;
    }

    /* Adjust Visual card padding for mobile */
    #file-home .visual-preview,
    #file-about .visual-preview,
    #file-experience .visual-preview,
    #file-contact .visual-preview {
        padding: 1rem 1.25rem;
    }

    #file-home .visual-card,
    #file-about .visual-card,
    #file-experience .visual-card,
    #file-contact .visual-card {
        padding: 1.5rem 1.75rem;
    }

    /* Scale down logo options on mobile */
    .visual-card.logo-badge::after {
        width: 32px;
        height: 32px;
        top: 1rem;
        right: 1rem;
    }

    .visual-card.logo-watermark::after {
        width: 45px;
        height: 45px;
        bottom: 1rem;
        right: 1rem;
    }

    .visual-card.logo-accent::before {
        width: 40px;
        height: 40px;
        background-size: 24px 24px;
        background-position: 8px 8px;
    }
}

@media only screen and (max-width: 480px) {
    .editor-window {
        margin: 1.5rem 0.5rem;
        border-radius: 8px;
    }

    .editor-tab {
        padding: 0.5rem 0.75rem;
        gap: 0.25rem;
    }

    .tab-icon {
        font-size: 0.8rem;
    }

    .tab-name {
        font-size: 0.75rem;
    }

    .editor-statusbar {
        font-size: 0.6rem;
        padding: 0.3rem 0.5rem;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        position: fixed;
        bottom: 73px; /* Height of mobile nav */
        left: 0;
        right: 0;
        z-index: 999;
    }

    .status-left,
    .status-right {
        gap: 0.4rem;
    }

    .status-item {
        gap: 0.2rem;
    }

    /* Optimize progress bar for small screens */
    .status-progress {
        margin: 0 0.5rem;
        height: 2px;
    }

    /* No body padding needed - navigation is fixed */
    body {
        padding-bottom: 0;
    }
}

/* ===================================
   Legacy Styles (for other pages)
   =================================== */
.music {
    margin: 0 auto;
    display: block;
    text-align: center;
}

.music h4 {
    color: white;
}

/* ===================================
   Icon System & Toggle Bar Overrides
   =================================== */
/* Ensure toggle bar and its icon are always visible above sidebar */
.sidebar-toggle-bar {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0;
}

.sidebar-toggle-icon {
    writing-mode: initial;
    text-orientation: initial;
}

/* Font Awesome icon colors and sizes */
.tab-icon i,
.file-icon i,
.mobile-nav-icon i,
.sidebar-toggle-icon i {
    color: #cccccc;
}

/* Active/hover states for icons */
.editor-tab.active .tab-icon i { color: #4fc3f7; }
.editor-tab:hover .tab-icon i { color: #ffffff; }

.file-tree-item.active .file-icon i { color: #4fc3f7; }
.file-tree-item:hover .file-icon i { color: #ffffff; }

.mobile-nav-item.active .mobile-nav-icon i { color: #4fc3f7; }

/* Base sizes to match previous emoji sizing */
.tab-icon i { font-size: 0.95rem; }
.file-icon i { font-size: 0.95rem; }
.mobile-nav-icon i { font-size: 1.3rem; }
.sidebar-toggle-icon i { font-size: 1.5rem; color: #969696; }

.sidebar-toggle-bar:hover .sidebar-toggle-icon i { color: #cccccc; }
