/* ============================================
   SahinOS — Window System Styles
   ============================================ */

.os-window {
    position: absolute;
    min-width: 400px;
    min-height: 300px;
    background: var(--bg-glass);
    backdrop-filter: var(--blur-xl);
    -webkit-backdrop-filter: var(--blur-xl);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: windowOpen 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: box-shadow var(--transition-fast);
}

.os-window.focused {
    box-shadow: var(--shadow-xl);
    border-color: var(--border-light);
}

.os-window.closing {
    animation: windowClose 0.25s ease forwards;
    pointer-events: none;
}

.os-window.minimizing {
    animation: windowMinimize 0.3s ease forwards;
    pointer-events: none;
}

.os-window.restoring {
    animation: windowRestore 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.os-window.maximized {
    border-radius: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.os-window.dragging {
    transition: none !important;
    opacity: 0.92;
}

/* Titlebar */
.window-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 36px;
    padding: 0 8px 0 12px;
    flex-shrink: 0;
    cursor: default;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.window-titlebar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

.window-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.window-icon svg {
    width: 100%;
    height: 100%;
}

.window-title {
    font-size: 12.5px;
    font-weight: 400;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.os-window.focused .window-title {
    color: var(--text-primary);
}

/* Window Controls */
.window-controls {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

.win-ctrl {
    width: 32px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.win-ctrl:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.win-ctrl.win-close:hover {
    background: var(--accent-red);
    color: white;
}

.win-ctrl svg {
    width: 12px;
    height: 12px;
}

/* Window Body */
.window-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    position: relative;
}

/* Resize Handle */
.window-resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 16px;
    height: 16px;
    cursor: nwse-resize;
}

/* ============================================
   App Content Styles
   ============================================ */

/* About App */
.app-about {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.about-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.about-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.about-info h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
}

.about-info p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

.about-bio {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
}

.about-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.about-card {
    padding: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    text-align: center;
    transition: all var(--transition-fast);
}

.about-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--border-light);
}

.about-card-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-blue);
}

.about-card-label {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.about-skills-section {
    margin-top: 8px;
}

.about-tags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.about-tag {
    padding: 5px 14px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--accent-blue);
    transition: all var(--transition-fast);
}

.about-tag:hover {
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(59, 130, 246, 0.35);
}

/* Projects App */
.app-projects {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.project-card {
    padding: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    cursor: default;
}

.project-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.project-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.project-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.project-tag {
    padding: 3px 10px;
    background: rgba(59, 130, 246, 0.15);
    border-radius: 12px;
    font-size: 11px;
    color: var(--accent-blue);
    font-weight: 500;
}

/* Skills App */
.app-skills {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.skill-category {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
}

.skill-category h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.skill-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skill-name {
    font-size: 13px;
    color: var(--text-primary);
}

.skill-percent {
    font-size: 12px;
    color: var(--text-tertiary);
}

.skill-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
    width: 0;
}

.skill-fill.animated {
    /* width set inline */
}

/* Contact App */
.app-contact {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    color: inherit;
}

.contact-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--border-light);
}

.contact-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon svg {
    width: 20px;
    height: 20px;
}

.contact-info h4 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.contact-info p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* CV App */
.app-cv {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cv-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.cv-download-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: var(--accent-blue);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.cv-download-btn:hover {
    background: var(--accent-blue-hover);
}

.cv-download-btn svg {
    width: 16px;
    height: 16px;
}

.cv-section {
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.cv-section h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--accent-blue);
    margin-bottom: 12px;
}

.cv-entry {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.cv-entry:last-child {
    border-bottom: none;
}

.cv-entry-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.cv-entry-sub {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.cv-entry-date {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

/* Gallery App */
.app-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.gallery-item {
    aspect-ratio: 4 / 3;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.gallery-item:hover {
    border-color: var(--border-light);
    transform: scale(1.02);
}

.gallery-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-tertiary);
}

.gallery-placeholder svg {
    width: 32px;
    height: 32px;
}

.gallery-placeholder span {
    font-size: 12px;
}

/* Gallery Thumbnail Images */
.gallery-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-thumb {
    transform: scale(1.05);
}

.gallery-hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.gallery-item:hover .gallery-hover-overlay {
    opacity: 1;
}

.gallery-hover-overlay svg {
    width: 28px;
    height: 28px;
    color: white;
}

/* Lightbox */
.gallery-lightbox {
    position: absolute;
    inset: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.gallery-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lightbox-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90%;
    max-height: 85%;
}

.lightbox-img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.lightbox-caption {
    margin-top: 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    text-align: center;
}

.lightbox-counter {
    margin-top: 4px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-close svg {
    width: 18px;
    height: 18px;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lightbox-nav svg {
    width: 20px;
    height: 20px;
}

.lightbox-prev {
    left: 12px;
}

.lightbox-next {
    right: 12px;
}

/* Gallery Wrap & Reference section */
.app-gallery-wrap {
    padding: 0;
}

.gallery-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 16px 0 8px 0;
    padding: 8px 4px;
    border-top: 1px solid var(--border-subtle);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gallery-section-title svg {
    color: var(--accent-primary);
    opacity: 0.8;
}

/* Reference gallery items */
.gallery-type-ref {
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.gallery-type-ref:hover {
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.15);
}

.gallery-ref-overlay {
    flex-direction: column;
    gap: 6px;
    background: rgba(0, 0, 0, 0.6) !important;
}

.gallery-ref-overlay .ref-link-icon {
    width: 24px;
    height: 24px;
    color: #a78bfa;
}

.gallery-ref-overlay .ref-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    text-align: center;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gallery-ref-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(139, 92, 246, 0.85);
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* ============================
   REFERENCES APP
   ============================ */
.app-references {
    height: 100%;
    overflow-y: auto;
}
.ref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    padding: 4px 0;
}
.ref-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}
.ref-card:hover {
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.12);
}
.ref-card-img {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: rgba(0,0,0,0.1);
}
.ref-card-img img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.3s ease;
}
.ref-card:hover .ref-card-img img { transform: scale(1.05); }
.ref-card-title {
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Reference Detail */
.ref-detail {
    padding: 0;
    animation: fadeIn 0.25s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.ref-back-btn {
    background: none;
    border: none;
    color: var(--accent-blue);
    font-size: 13px;
    cursor: pointer;
    padding: 4px 0 12px;
    font-weight: 500;
    transition: color 0.15s;
}
.ref-back-btn:hover { color: var(--accent-blue-hover); }
.ref-detail-layout {
    display: flex;
    gap: 20px;
    min-height: 0;
}
.ref-detail-image {
    flex: 0 0 50%;
    max-width: 50%;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: rgba(0,0,0,0.1);
}
.ref-detail-image img {
    width: 100%; height: auto;
    display: block;
    border-radius: var(--radius-md);
}
.ref-detail-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}
.ref-detail-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
.ref-detail-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}
.ref-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.ref-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    background: rgba(139, 92, 246, 0.12);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.2);
}
.ref-detail-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-blue);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    margin-top: auto;
    padding: 8px 14px;
    background: rgba(59, 130, 246, 0.08);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.15s;
    max-width: fit-content;
}
.ref-detail-link:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
}
/* Responsive: stack on small */
@media (max-width: 600px) {
    .ref-detail-layout { flex-direction: column; }
    .ref-detail-image { flex: none; max-width: 100%; }
    .ref-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* ============================
   MEDIA GALLERY APP
   ============================ */
.app-mediagallery {
    height: 100%;
    overflow-y: auto;
    position: relative;
}
.mg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    padding: 8px;
}
.mg-item {
    aspect-ratio: 16/10;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background: rgba(0,0,0,0.15);
    border: 1px solid var(--border-subtle);
    transition: all 0.2s ease;
}
.mg-item:hover {
    border-color: var(--border-light);
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.mg-item img {
    width: 100%; height: 100%; object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.mg-item:hover img { transform: scale(1.05); }
.mg-play-badge {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    transition: background 0.2s;
}
.mg-item:hover .mg-play-badge { background: rgba(0,0,0,0.5); }
.mg-item-title {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 6px 8px;
    font-size: 11px;
    font-weight: 500;
    color: white;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Video overlay */
.mg-video-overlay {
    position: absolute;
    inset: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mg-video-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}
.mg-video-content {
    position: relative;
    z-index: 2;
    width: 90%;
    height: 80%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Image Viewer App */
.app-imageviewer {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #0a0a0a;
    position: relative;
}
.iv-image-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 16px;
    min-height: 0;
}
.iv-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 24px rgba(0,0,0,0.5);
    user-select: none;
    transition: opacity 0.2s ease;
}
.iv-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255,255,255,0.06);
    border-top: 1px solid rgba(255,255,255,0.08);
}
.iv-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: none;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.15s ease;
}
.iv-btn:hover { background: rgba(255,255,255,0.15); color: white; }
.iv-counter {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    min-width: 50px;
    text-align: center;
}
.iv-spacer { flex: 1; }
.iv-wallpaper-btn {
    background: rgba(59,130,246,0.15);
    color: rgba(147,197,253,0.9);
    border: 1px solid rgba(59,130,246,0.2);
}
.iv-wallpaper-btn:hover {
    background: rgba(59,130,246,0.25);
    color: white;
}
/* Context menus (image viewer + gallery) */
.iv-context-menu, .mg-context-menu {
    position: absolute;
    z-index: 1000;
    background: rgba(30,30,30,0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    padding: 4px;
    min-width: 200px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.iv-ctx-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    cursor: pointer;
    transition: background 0.1s;
    text-align: left;
}
.iv-ctx-item:hover {
    background: rgba(59,130,246,0.25);
    color: white;
}

/* Browser App */
.app-browser {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: -20px;
}

.browser-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-subtle);
}

.browser-nav-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.browser-nav-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.browser-address {
    flex: 1;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: var(--font-sans);
    outline: none;
    transition: border-color var(--transition-fast);
}

.browser-address:focus {
    border-color: var(--border-focus);
}

.browser-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.browser-tabs {
    display: flex;
    gap: 2px;
    padding: 6px 12px 0;
    background: rgba(0, 0, 0, 0.25);
}

.browser-tab {
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.browser-tab.active {
    background: var(--bg-glass);
    border-color: var(--border-subtle);
    color: var(--text-primary);
}

.browser-tab {
    display: flex;
    align-items: center;
    gap: 6px;
}

.browser-tab-icon {
    flex-shrink: 0;
    opacity: 0.6;
}

.browser-nav-btn.disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* Address bar wrap with search icon */
.browser-address-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.browser-search-icon {
    position: absolute;
    left: 10px;
    color: var(--text-secondary);
    opacity: 0.5;
    pointer-events: none;
}

.browser-address-wrap .browser-address {
    padding-left: 30px;
    width: 100%;
}

/* Loading bar */
.browser-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 10;
    overflow: hidden;
}

.browser-loading-bar {
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    border-radius: 2px;
    animation: browserLoadingSlide 1.2s ease-in-out infinite;
}

@keyframes browserLoadingSlide {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(200%); }
    100% { transform: translateX(400%); }
}

/* Error overlay */
.browser-error-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 25, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    backdrop-filter: blur(8px);
}

.browser-error-content {
    text-align: center;
    max-width: 380px;
    padding: 32px;
}

.browser-error-content svg {
    margin-bottom: 16px;
    opacity: 0.7;
}

.browser-error-content h3 {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.browser-error-content p {
    color: var(--text-secondary);
    font-size: 13px;
    margin: 0 0 24px 0;
    line-height: 1.5;
}

.browser-error-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.browser-error-btn {
    padding: 8px 18px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
}

.browser-error-btn:hover {
    background: rgba(255, 255, 255, 0.14);
}

.browser-error-newtab {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    color: #60a5fa;
}

.browser-error-newtab:hover {
    background: rgba(59, 130, 246, 0.3);
}

/* Snap Indicator */
.snap-indicator {
    display: none;
    position: fixed;
    background: rgba(59, 130, 246, 0.12);
    border: 2px solid rgba(59, 130, 246, 0.35);
    border-radius: 10px;
    z-index: 99;
    pointer-events: none;
    transition: all 0.15s ease;
}

/* Wallpaper Presets in Settings */
.wallpaper-presets {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    padding: 4px 0;
}

.wallpaper-thumb {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.2s;
    text-align: center;
}

.wallpaper-thumb.active {
    border-color: var(--accent-blue);
}

.wallpaper-thumb:hover {
    border-color: rgba(255,255,255,0.3);
}

.wp-preview {
    width: 100%;
    height: 48px;
    border-radius: 6px 6px 0 0;
}

.wallpaper-thumb span {
    display: block;
    font-size: 10px;
    color: var(--text-secondary);
    padding: 3px 0;
}

/* ============================================
   Notepad App
   ============================================ */
.app-notepad {
    display: flex;
    height: 100%;
    margin: -20px;
    overflow: hidden;
}

.notepad-sidebar {
    width: 200px;
    background: rgba(0, 0, 0, 0.15);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.notepad-sidebar-header {
    padding: 10px;
    border-bottom: 1px solid var(--border-subtle);
}

.notepad-new-btn {
    width: 100%;
    padding: 8px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 6px;
    color: var(--accent-blue);
    cursor: pointer;
    font-size: 12px;
    transition: all var(--transition-fast);
}

.notepad-new-btn:hover {
    background: rgba(59, 130, 246, 0.25);
}

.notepad-list {
    flex: 1;
    overflow-y: auto;
}

.notepad-list-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background var(--transition-fast);
}

.notepad-list-item:hover { background: var(--bg-hover); }
.notepad-list-item.active { background: rgba(59, 130, 246, 0.12); border-left: 2px solid var(--accent-blue); }

.notepad-list-title { font-size: 13px; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notepad-list-date { font-size: 10px; color: var(--text-tertiary); margin-top: 2px; }

.notepad-empty { padding: 20px; text-align: center; color: var(--text-tertiary); font-size: 12px; }

.notepad-editor {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.notepad-editor-header {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    gap: 8px;
    border-bottom: 1px solid var(--border-subtle);
}

.notepad-title-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    outline: none;
    font-family: var(--font-sans);
}

.notepad-delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.notepad-delete-btn:hover { opacity: 1; }

.notepad-textarea {
    flex: 1;
    resize: none;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.7;
    padding: 16px;
    outline: none;
    font-family: var(--font-sans);
}

.notepad-status {
    padding: 4px 12px;
    font-size: 11px;
    color: var(--accent-green);
    height: 20px;
}

/* ============================================
   Calendar App
   ============================================ */
/* ── Calendar App — Appointment Booking System ── */
.app-calendar {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: -20px;
    padding: 16px;
    gap: 10px;
    overflow: hidden;
}

.calendar-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.calendar-nav {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.calendar-nav:hover { background: var(--bg-hover); }
.cal-back-btn { font-size: 14px; }

.calendar-month-year {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.calendar-today-btn {
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-secondary);
    font-size: 11px;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.calendar-today-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

/* Month View */
.calendar-month-view { flex-shrink: 0; }
.calendar-days-header { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.cal-day-name { font-size: 11px; color: var(--text-tertiary); padding: 4px 0; font-weight: 600; }

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    gap: 1px;
}
.cal-day-num { line-height: 1; }
.cal-day:not(.empty):hover { background: var(--bg-hover); }
.cal-day.today { color: var(--accent-blue); font-weight: 700; background: rgba(59, 130, 246, 0.1); }
.cal-day.empty { cursor: default; }
.cal-day.has-appointments { background: rgba(59, 130, 246, 0.06); }

.cal-initials {
    font-size: 7px;
    color: var(--accent-blue);
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1;
}
.cal-initials-pending { color: var(--accent-amber, #f59e0b); }

/* Day View */
.calendar-day-view {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
}

.cal-day-date {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    padding: 4px 0;
    flex-shrink: 0;
}

.cal-sections-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 4px;
}

.cal-section {
    background: rgba(0,0,0,0.1);
    border-radius: 10px;
    padding: 10px;
}

.cal-section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.cal-slot {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: all var(--transition-fast);
    min-height: 42px;
}

.cal-slot-time {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    width: 50px;
    flex-shrink: 0;
}

.cal-slot-status {
    flex: 1;
    font-size: 12px;
}

.cal-slot.available {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    cursor: pointer;
}
.cal-slot.available:hover {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.4);
}
.cal-slot.available .cal-slot-status { color: #22c55e; }

.cal-slot.occupied {
    background: rgba(100, 116, 139, 0.1);
    border: 1px solid rgba(100, 116, 139, 0.15);
}
.cal-slot.occupied .cal-slot-status { color: var(--text-tertiary); font-weight: 500; }

.cal-slot.pending {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
}
.cal-slot.pending .cal-slot-status { color: #f59e0b; font-style: italic; }

.cal-slot.past {
    background: rgba(0,0,0,0.05);
    border: 1px solid transparent;
    opacity: 0.4;
}
.cal-slot.past .cal-slot-status { color: var(--text-tertiary); }

/* Booking Overlay */
.calendar-booking-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.calendar-booking-form {
    background: var(--bg-glass, rgba(32, 32, 48, 0.95));
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 20px;
    width: 90%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    backdrop-filter: blur(20px);
}

.cal-booking-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.cal-booking-time {
    font-size: 12px;
    color: var(--accent-blue);
    font-weight: 500;
    margin-bottom: 4px;
}

.cal-booking-input {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}
.cal-booking-input:focus { border-color: var(--accent-blue); }
.cal-booking-input::placeholder { color: var(--text-tertiary); }

.cal-booking-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.cal-booking-cancel {
    flex: 1;
    padding: 9px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.cal-booking-cancel:hover { background: var(--bg-hover); }

.cal-booking-submit {
    flex: 1;
    padding: 9px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.cal-booking-submit:hover { opacity: 0.9; }
.cal-booking-submit:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============================================
   File Manager App
   ============================================ */
.app-filemanager {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: -20px;
}

.fm-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(0,0,0,0.15);
    border-bottom: 1px solid var(--border-subtle);
}

.fm-breadcrumb {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.fm-crumb { cursor: pointer; }
.fm-crumb:hover { color: var(--text-primary); }
.fm-crumb-current { color: var(--text-primary); font-weight: 500; }

.fm-view-toggle { display: flex; gap: 4px; }

.fm-view-btn {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.fm-view-btn.active { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); border-color: rgba(59, 130, 246, 0.3); }
.fm-view-btn:hover { background: var(--bg-hover); }

.fm-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.fm-sidebar {
    width: 180px;
    background: rgba(0,0,0,0.1);
    border-right: 1px solid var(--border-subtle);
    padding: 8px;
    overflow-y: auto;
    flex-shrink: 0;
}

.fm-folder {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.fm-folder:hover { background: var(--bg-hover); color: var(--text-primary); }
.fm-folder.active { background: rgba(59, 130, 246, 0.12); color: var(--accent-blue); }
.fm-folder-icon { font-size: 16px; }
.fm-folder-count { margin-left: auto; font-size: 11px; opacity: 0.5; }

.fm-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.fm-content.fm-grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    align-content: start;
}

.fm-item-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.fm-item-grid:hover { background: var(--bg-hover); }
.fm-item-icon { font-size: 36px; }
.fm-item-thumb { width: 72px; height: 54px; border-radius: 6px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.25); border: 1px solid rgba(255,255,255,0.08); position: relative; }
.fm-play-badge { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); background: rgba(0,0,0,0.55); border-radius: 50%; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.fm-play-badge svg { width: 16px; height: 16px; margin-left: 2px; }
.fm-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fm-item-name { font-size: 11px; color: var(--text-primary); word-break: break-word; }

.fm-content.fm-list-view { display: flex; flex-direction: column; gap: 2px; }

.fm-item-list {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.fm-item-list:hover { background: var(--bg-hover); }
.fm-item-icon-sm { font-size: 18px; }
.fm-item-list .fm-item-name { font-size: 13px; flex: 1; }
.fm-item-meta { font-size: 11px; color: var(--text-tertiary); }

.fm-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-tertiary);
    font-size: 13px;
    grid-column: 1 / -1;
}

.fm-statusbar {
    padding: 4px 12px;
    font-size: 11px;
    color: var(--text-tertiary);
    border-top: 1px solid var(--border-subtle);
    background: rgba(0,0,0,0.1);
}

/* Settings App */
.app-settings {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-group {
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.settings-group h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-label {
    font-size: 13px;
    color: var(--text-primary);
}

.settings-value {
    font-size: 13px;
    color: var(--text-secondary);
}

.settings-select {
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-family: var(--font-sans);
    cursor: pointer;
    outline: none;
}

.settings-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.settings-toggle {
    position: relative;
    width: 40px;
    height: 22px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 11px;
    border: none;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.settings-toggle.active {
    background: var(--accent-blue);
}

.settings-toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: transform var(--transition-fast);
}

.settings-toggle.active::after {
    transform: translateX(18px);
}

/* Brightness Slider */
.settings-slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 150px;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.settings-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-blue);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.settings-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-blue);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.settings-slider-value {
    font-size: 12px;
    color: var(--text-secondary);
    min-width: 32px;
    text-align: center;
}


/* Guestbook App */
.app-guestbook {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.guestbook-header {
    text-align: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.guestbook-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px;
}

.guestbook-header p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

.guestbook-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.guestbook-input,
.guestbook-textarea {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 13px;
    font-family: var(--font-sans);
    outline: none;
    transition: border-color var(--transition-fast);
    resize: none;
}

.guestbook-input:focus,
.guestbook-textarea:focus {
    border-color: var(--border-focus);
}

.guestbook-submit {
    padding: 10px 24px;
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all var(--transition-fast);
    align-self: flex-start;
}

.guestbook-submit:hover {
    background: var(--accent-blue-hover);
}

.guestbook-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.guestbook-toast {
    font-size: 13px;
    color: #22c55e;
    opacity: 0;
    transition: opacity 0.3s;
}

.guestbook-toast.visible {
    opacity: 1;
}

.guestbook-entries-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 10px;
}

.guestbook-entries {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 240px;
    overflow-y: auto;
}

.guestbook-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}

.guestbook-nick {
    font-size: 13px;
    font-weight: 500;
    color: var(--accent-blue);
}

.guestbook-date {
    font-size: 11px;
    color: var(--text-tertiary);
}

.guestbook-empty {
    text-align: center;
    padding: 20px;
    color: var(--text-tertiary);
    font-size: 13px;
}


/* Blog App */
.app-blog {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}

.blog-header {
    text-align: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 16px;
}

.blog-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px;
}

.blog-header p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

.blog-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.blog-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.blog-card:hover {
    border-color: var(--border-focus);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.blog-card-cover {
    width: 100%;
    height: 140px;
    background-size: cover;
    background-position: center;
}

.blog-card-body {
    padding: 14px 16px;
}

.blog-card-date {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog-card-badge {
    display: inline-block;
    background: rgba(236, 72, 153, 0.2);
    color: #EC4899;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.blog-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 6px;
    line-height: 1.3;
}

.blog-card-excerpt {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0 0 8px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-comments {
    font-size: 11px;
    color: var(--text-tertiary);
}

.blog-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-tertiary);
    font-size: 14px;
}

.blog-back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 13px;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: 16px;
}

.blog-back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.blog-detail-view {
    overflow-y: auto;
    flex: 1;
}

.blog-detail-cover {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
}

.blog-detail-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px;
    line-height: 1.3;
}

.blog-detail-date {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 16px;
}

.blog-video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    margin: 16px 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.blog-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.blog-detail-body {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
}

.blog-detail-body p { margin: 0 0 12px; }
.blog-detail-body h2, .blog-detail-body h3 { color: var(--text-primary); margin: 16px 0 8px; }
.blog-detail-body img { max-width: 100%; border-radius: var(--radius-md); }
.blog-detail-body a { color: var(--accent-blue); text-decoration: underline; }
.blog-detail-body ul, .blog-detail-body ol { padding-left: 20px; margin: 8px 0; }

.blog-comments-section {
    border-top: 1px solid var(--border-subtle);
    padding-top: 16px;
}

.blog-comments-section h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px;
}

.blog-comment-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.blog-comment-nickname,
.blog-comment-message {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 13px;
    font-family: var(--font-sans);
    outline: none;
    transition: border-color var(--transition-fast);
    resize: none;
}

.blog-comment-nickname:focus,
.blog-comment-message:focus {
    border-color: var(--border-focus);
}

.blog-comment-submit {
    padding: 8px 20px;
    background: #EC4899;
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all var(--transition-fast);
    align-self: flex-start;
}

.blog-comment-submit:hover { background: #DB2777; }
.blog-comment-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.blog-comment-toast {
    font-size: 13px;
    color: #22c55e;
    opacity: 0;
    transition: opacity 0.3s;
}

.blog-comment-toast.visible { opacity: 1; }
.blog-comment-toast.error { color: #ef4444; }

.blog-comments-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.blog-comment {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.blog-comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.blog-comment-nick {
    font-size: 13px;
    font-weight: 600;
    color: #EC4899;
}

.blog-comment-date {
    font-size: 11px;
    color: var(--text-tertiary);
}

.blog-comment-text {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.blog-no-comments {
    text-align: center;
    padding: 16px;
    color: var(--text-tertiary);
    font-size: 13px;
}


/* ── Floating Chat Bubble ── */
/* ── Floating Chat FAB (Lottie Character Bubble) ── */
.chat-fab {
    position: fixed;
    bottom: 58px;
    right: 16px;
    width: 90px;
    height: 90px;
    cursor: pointer;
    z-index: 900;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(0 4px 12px rgba(0, 120, 255, 0.35));
    overflow: visible;
}

.chat-fab:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 6px 20px rgba(0, 120, 255, 0.6));
}

.chat-fab:active {
    transform: scale(0.93);
}

/* Glow effect behind character */
.chat-fab-glow {
    position: absolute;
    top: 15%;
    left: 15%;
    width: 70%;
    height: 70%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 140, 255, 0.25) 0%, transparent 70%);
    animation: chatFabGlow 2.5s ease-in-out infinite alternate;
    pointer-events: none;
}

/* Lottie web component */
.chat-fab dotlottie-wc {
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

@keyframes chatFabGlow {
    0% { opacity: 0.4; transform: scale(1); }
    100% { opacity: 0.9; transform: scale(1.2); }
}


/* ── Chatbot App ── */
.os-window[data-app="chatbot"] .window-body {
    overflow: hidden;
    padding: 0;
}

.app-chatbot {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: rgba(15, 15, 30, 0.95);
    overflow: hidden;
    margin: -20px;
    width: calc(100% + 40px);
    height: calc(100% + 40px);
}

.chatbot-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chatbot-msg {
    display: flex;
    gap: 8px;
    max-width: 88%;
    animation: chatFadeIn 0.3s ease;
}

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

.chatbot-msg.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chatbot-msg.bot {
    align-self: flex-start;
}

.chatbot-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8B5CF6, #6D28D9);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
}

.chatbot-bubble {
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
    white-space: pre-wrap;
}

.chatbot-msg.bot .chatbot-bubble {
    background: rgba(139, 92, 246, 0.15);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.chatbot-msg.user .chatbot-bubble {
    background: rgba(59, 130, 246, 0.3);
    color: var(--text-primary);
    border-bottom-right-radius: 4px;
}

/* Typing animation */
.chatbot-typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px !important;
    align-items: center;
}

.chatbot-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #8B5CF6;
    animation: chatTypingDot 1.4s infinite;
}

.chatbot-typing span:nth-child(2) { animation-delay: 0.2s; }
.chatbot-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes chatTypingDot {
    0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
    30% { opacity: 1; transform: scale(1); }
}

/* Input area */
.chatbot-input-area {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.chatbot-input-area input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

.chatbot-input-area input:focus {
    border-color: #8B5CF6;
}

.chatbot-input-area input::placeholder {
    color: var(--text-tertiary);
}

#chatbot-send {
    padding: 8px 18px;
    border-radius: 20px;
    border: none;
    background: linear-gradient(135deg, #8B5CF6, #6D28D9);
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

#chatbot-send:hover { opacity: 0.9; }
#chatbot-send:active { transform: scale(0.95); }
#chatbot-send:disabled { opacity: 0.5; cursor: not-allowed; }


/* Code Editor App */
.app-codeeditor {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: -20px;
    background: #1e1e2e;
}

.codeeditor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    background: rgba(0, 0, 0, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.codeeditor-file-tabs {
    display: flex;
    flex: 1;
    overflow-x: auto;
    min-width: 0;
}

.codeeditor-file-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 400;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all var(--transition-fast);
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    white-space: nowrap;
    flex-shrink: 0;
}

.codeeditor-file-tab:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
}

.codeeditor-file-tab.active {
    background: #1e1e2e;
    color: var(--text-primary);
    font-weight: 500;
}

.codeeditor-file-tab svg {
    flex-shrink: 0;
}

.codeeditor-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    flex-shrink: 0;
}

.codeeditor-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.codeeditor-reset-btn {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    padding: 5px 8px;
}

.codeeditor-reset-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.codeeditor-run-btn {
    background: #22c55e;
    color: white;
}

.codeeditor-run-btn:hover {
    background: #16a34a;
}

.codeeditor-split {
    display: flex;
    flex-direction: row;
    flex: 1;
    min-height: 0;
}

.codeeditor-code-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.codeeditor-preview-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.codeeditor-panel-label {
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.codeeditor-editor-wrap {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.codeeditor-line-numbers {
    padding: 10px 0;
    width: 40px;
    background: rgba(0, 0, 0, 0.2);
    text-align: right;
    overflow: hidden;
    flex-shrink: 0;
    user-select: none;
}

.codeeditor-line-numbers div {
    padding: 0 8px 0 4px;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 12px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.25);
}

.codeeditor-textarea {
    flex: 1;
    padding: 10px 12px;
    background: #1e1e2e;
    border: none;
    color: #e2e8f0;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 12px;
    line-height: 1.6;
    resize: none;
    outline: none;
    tab-size: 4;
    white-space: pre;
    overflow: auto;
    min-width: 0;
}

.codeeditor-textarea::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.codeeditor-divider {
    width: 1px;
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.codeeditor-iframe {
    flex: 1;
    border: none;
    background: white;
    width: 100%;
    min-height: 0;
}

/* ── Mobile Responsive ── */
@media (max-width: 768px) {
    .os-window {
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        height: calc(100vh - var(--taskbar-height)) !important;
        height: calc(var(--app-vh, 100vh) - var(--taskbar-height)) !important;
        min-width: 0 !important;
        min-height: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .window-titlebar {
        padding: 0 8px;
        min-height: 36px;
    }

    .window-title {
        font-size: 12px;
    }

    .win-minimize, .win-maximize {
        display: none;
    }

    .window-body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .window-resize-handle {
        display: none;
    }

    /* Content adaptations */
    .app-about,
    .app-projects,
    .app-skills,
    .app-contact,
    .app-cv,
    .app-gallery,
    .app-settings {
        padding: 12px !important;
    }

    .about-header {
        flex-direction: column;
        text-align: center;
    }

    .about-stats {
        flex-wrap: wrap;
        justify-content: center;
    }

    .projects-grid {
        grid-template-columns: 1fr !important;
    }

    .skills-category {
        min-width: 0 !important;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .cv-content {
        padding: 12px !important;
    }

    .settings-sections {
        flex-direction: column;
    }

    .settings-sidebar {
        flex-direction: row;
        overflow-x: auto;
        min-width: 0;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
    }

    .browser-content {
        padding: 8px !important;
    }

    .calculator-display {
        font-size: 28px !important;
    }

    .app-codeeditor {
        margin: -12px;
    }

    .codeeditor-toolbar {
        flex-wrap: wrap;
    }

    .codeeditor-file-tabs {
        order: 2;
        width: 100%;
        border-top: 1px solid rgba(255, 255, 255, 0.04);
    }

    .codeeditor-file-tab {
        padding: 6px 10px;
        font-size: 11px;
    }

    .codeeditor-actions {
        order: 1;
        padding: 6px 10px;
        margin-left: auto;
    }

    .codeeditor-split {
        flex-direction: column;
    }

    .codeeditor-divider {
        width: 100%;
        height: 1px;
    }

    .codeeditor-line-numbers {
        width: 32px;
    }

    .codeeditor-line-numbers div {
        font-size: 11px;
    }

    .codeeditor-textarea {
        font-size: 11px;
    }

    /* Chat FAB — smaller on mobile */
    .chat-fab {
        width: 60px;
        height: 60px;
        bottom: 62px;
        right: 8px;
    }

    /* Chatbot app — mobile fixes */
    .os-window[data-app="chatbot"] .window-body {
        overflow: hidden !important;
        padding: 0 !important;
        display: flex;
        flex-direction: column;
    }

    .app-chatbot {
        margin: 0;
        height: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .chatbot-messages {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 10px;
        gap: 10px;
    }

    .chatbot-msg {
        max-width: 92%;
    }

    .chatbot-bubble {
        font-size: 13px;
        padding: 8px 12px;
    }

    .chatbot-input-area {
        padding: 8px 10px;
        gap: 6px;
        flex-shrink: 0;
        position: sticky;
        bottom: 0;
        z-index: 10;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(15, 15, 30, 0.98);
    }

    .chatbot-input-area input {
        padding: 9px 12px;
        font-size: 16px;
        min-width: 0;
        /* iOS zoom engellemek için 16px altına düşürme */
    }

    #chatbot-send {
        padding: 9px 14px;
        font-size: 12px;
        white-space: nowrap;
        flex-shrink: 0;
    }
}

/* ============================================
   LIGHT THEME — Global Window Content Overrides
   ============================================ */

/* Window body backgrounds */
[data-theme="light"] .window-body {
    color: #1a1a2e !important;
}

/* Settings — toggles, sliders */
[data-theme="light"] .settings-group {
    background: rgba(0, 0, 0, 0.02) !important;
}
[data-theme="light"] .settings-toggle {
    background: rgba(0, 0, 0, 0.12) !important;
}
[data-theme="light"] .settings-toggle.active {
    background: var(--accent-blue) !important;
}
[data-theme="light"] .settings-slider {
    background: rgba(0, 0, 0, 0.1) !important;
}
[data-theme="light"] .settings-select {
    background: rgba(0, 0, 0, 0.04) !important;
}

/* Gallery — image viewer controls */
[data-theme="light"] .iv-toolbar {
    background: rgba(240, 240, 245, 0.95) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
[data-theme="light"] .iv-btn {
    background: rgba(0, 0, 0, 0.06) !important;
    color: #333 !important;
}
[data-theme="light"] .iv-btn:hover {
    background: rgba(0, 0, 0, 0.1) !important;
    color: #1a1a2e !important;
}
[data-theme="light"] .iv-counter {
    color: #555 !important;
}
[data-theme="light"] .iv-wallpaper-btn {
    background: rgba(59, 130, 246, 0.1) !important;
    color: #2563eb !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
}
[data-theme="light"] .iv-wallpaper-btn:hover {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #1d4ed8 !important;
}
[data-theme="light"] .iv-context-menu,
[data-theme="light"] .mg-context-menu {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
}
[data-theme="light"] .iv-ctx-item {
    color: #333 !important;
}
[data-theme="light"] .iv-ctx-item:hover {
    background: rgba(59, 130, 246, 0.1) !important;
    color: #1a1a2e !important;
}

/* CV section backgrounds */
[data-theme="light"] .cv-section {
    background: rgba(0, 0, 0, 0.02) !important;
}

/* Gallery — media grid */
[data-theme="light"] .gallery-item {
    background: rgba(0, 0, 0, 0.03) !important;
}

/* Guestbook */
[data-theme="light"] .guestbook-input,
[data-theme="light"] .guestbook-textarea {
    background: rgba(0, 0, 0, 0.03) !important;
    color: #1a1a2e !important;
}
[data-theme="light"] .guestbook-entry {
    background: rgba(0, 0, 0, 0.02) !important;
}

/* Blog */
[data-theme="light"] .blog-post {
    background: rgba(0, 0, 0, 0.02) !important;
}
[data-theme="light"] .blog-comment-nickname,
[data-theme="light"] .blog-comment-message {
    background: rgba(0, 0, 0, 0.03) !important;
    color: #1a1a2e !important;
}

/* Chatbot */
[data-theme="light"] .chatbot-container {
    background: rgba(245, 245, 250, 0.95) !important;
}
[data-theme="light"] .chatbot-header {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(0, 0, 0, 0.06) !important;
    color: #1a1a2e !important;
}
[data-theme="light"] .chatbot-messages {
    background: rgba(250, 250, 252, 0.95) !important;
}
[data-theme="light"] .chatbot-bubble {
    background: rgba(0, 0, 0, 0.04) !important;
    color: #1a1a2e !important;
}
[data-theme="light"] .chatbot-msg.user .chatbot-bubble {
    background: rgba(59, 130, 246, 0.1) !important;
    color: #1a1a2e !important;
}
[data-theme="light"] .chatbot-input-area {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(0, 0, 0, 0.06) !important;
}
[data-theme="light"] .chatbot-input-area input {
    background: rgba(0, 0, 0, 0.04) !important;
    color: #1a1a2e !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

/* Code Editor — stays dark (intentional) */

/* Notepad */
[data-theme="light"] .notepad-textarea {
    background: rgba(0, 0, 0, 0.02) !important;
    color: #1a1a2e !important;
}

/* Calculator */
[data-theme="light"] .calc-display {
    background: rgba(0, 0, 0, 0.03) !important;
    color: #1a1a2e !important;
}
[data-theme="light"] .calc-btn {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #1a1a2e !important;
}
[data-theme="light"] .calc-btn:hover {
    background: rgba(0, 0, 0, 0.1) !important;
}

/* Terminal — stays dark (intentional) */

/* Quick settings panel */
[data-theme="light"] .qs-label {
    color: #1a1a2e !important;
}
[data-theme="light"] .qs-value {
    color: #555 !important;
}
[data-theme="light"] .qs-btn {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #333 !important;
}
[data-theme="light"] .qs-btn:hover {
    background: rgba(0, 0, 0, 0.08) !important;
}
[data-theme="light"] .qs-btn.active {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #2563eb !important;
}

/* References */
[data-theme="light"] .ref-card {
    background: rgba(0, 0, 0, 0.02) !important;
}
[data-theme="light"] .ref-label {
    color: #555 !important;
}

/* Contact form */
[data-theme="light"] .contact-input,
[data-theme="light"] .contact-textarea {
    background: rgba(0, 0, 0, 0.03) !important;
    color: #1a1a2e !important;
}

/* Skills */
[data-theme="light"] .skill-bar-bg {
    background: rgba(0, 0, 0, 0.08) !important;
}

/* File Manager */
[data-theme="light"] .fm-sidebar {
    background: rgba(0, 0, 0, 0.02) !important;
    border-color: rgba(0, 0, 0, 0.06) !important;
}
[data-theme="light"] .fm-item {
    color: #1a1a2e !important;
}
[data-theme="light"] .fm-item:hover {
    background: rgba(0, 0, 0, 0.04) !important;
}

/* Calendar */
[data-theme="light"] .cal-day {
    color: #1a1a2e !important;
}
[data-theme="light"] .cal-header {
    color: #1a1a2e !important;
}

/* ── Plugins App ── */
.app-plugins {
    padding: 24px;
    height: 100%;
    overflow-y: auto;
}
.plugins-header {
    margin-bottom: 20px;
}
.plugin-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 12px;
    background: var(--bg-secondary, rgba(255,255,255,0.05));
    border: 1px solid var(--border-color, rgba(255,255,255,0.08));
    transition: background 0.2s;
}
.plugin-card:hover {
    background: var(--bg-tertiary, rgba(255,255,255,0.08));
}
.plugin-icon {
    flex-shrink: 0;
}
.plugin-info {
    flex: 1;
    min-width: 0;
}
.plugin-download-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    background: #3b82f6;
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.2s;
}
.plugin-download-btn:hover {
    background: #2563eb;
}
