* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    height: 100vh;
    overflow: hidden;
    background: url('images/wallpaper.jpeg') no-repeat center center fixed;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    text-transform: lowercase;
}

/* Add a subtle overlay to ensure content visibility */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    pointer-events: none;
    z-index: 0;
}

/* Fake Mac Status Bar */
.status-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 28px;
    background: rgba(30, 30, 30, 0.95);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    z-index: 10000;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    padding: 0 18px;
    letter-spacing: 0.01em;
}
.status-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.status-bar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}
.status-apple {
    font-size: 18px;
    font-weight: bold;
    margin-right: 8px;
}
.status-menu {
    opacity: 0.85;
    cursor: pointer;
    transition: opacity 0.2s;
    padding: 2px 6px;
    border-radius: 4px;
}
.status-menu:hover {
    background: rgba(255,255,255,0.08);
    opacity: 1;
}
.status-time {
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    letter-spacing: 0.04em;
}
.status-icon {
    font-size: 15px;
    opacity: 0.85;
}

/* Push down desktop to not hide under status bar */
.desktop {
    width: 100%;
    height: calc(100vh - 28px); /* 100vh minus status bar height */
    position: relative;
    /* Remove padding-top as height calculation now accounts for status bar */
    /* padding-top: 28px; */
    opacity: 0;
    transform: scale(1.04);
    transition: none;
}
.desktop.desktop-loaded {
    animation: macDesktopIn 1.2s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes macDesktopIn {
    0% {
        opacity: 0;
        transform: scale(1.04);
    }
    60% {
        opacity: 1;
        transform: scale(1.01);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.dock {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 10px 10px 4px 10px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    width: auto;
    min-width: 0;
    max-width: 90vw;
    /* filter: url(#liquid-glass); */
}

.app-icon {
    width: 60px;
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
}

.app-icon:hover {
    transform: scale(1.2);
}

.app-icon img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.app-name {
    display: none;
}

.window {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    min-width: 250px;
    min-height: 180px;
    display: none;
    overflow: hidden;
}

.window.active {
    display: block;
    animation: windowOpen 0.3s ease-out;
}

.window-header {
    background: rgba(255, 255, 255, 0.8);
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.window-controls {
    display: flex;
    gap: 8px;
}

.window-control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
}

.close { background: #ff5f56; }
.minimize { background: #ffbd2e; }
.maximize { background: #27c93f; }

.window-title {
    flex-grow: 1;
    text-align: center;
    font-size: 14px;
    color: #333;
}

.window-content {
    padding: 20px;
}

@keyframes windowOpen {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Music Player Styles */
.music-player {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.album-art {
    width: 1000px;
    height: 200px;
    margin: 0 auto 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.song-info {
    text-align: center;
    margin-bottom: 20px;
}

.song-title {
    font-size: 24px;
    color: #333;
    margin-bottom: 5px;
}

.artist {
    font-size: 16px;
    color: #666;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    margin-bottom: 10px;
    cursor: pointer;
}

.progress {
    width: 0%;
    height: 100%;
    background: #1DB954;
    border-radius: 2px;
    transition: width 0.1s linear;
}

.time-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
    margin-bottom: 20px;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.control-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.control-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.control-btn svg {
    width: 24px;
    height: 24px;
    fill: #333;
}

.play-pause {
    width: 50px;
    height: 50px;
    background: #1DB954 !important;
}

.play-pause:hover {
    background: #1ed760 !important;
}

.play-pause svg {
    fill: white;
}

/* Photo Gallery Styles */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 5px;
    padding: 10px; /* Adjusted padding for Photos app */
    background: #000;
    height: calc(100% - 40px);
    overflow-y: auto;
    overflow-x: hidden;
    align-items: start; /* Align items to the top of their cells */
}

.photo-thumb {
    cursor: pointer;
    overflow: hidden;
    position: relative;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Add animation */
    opacity: 0;
    transform: scale(0.95);
    animation: fadeInScaleUp 0.5s ease-out forwards;
}

.photo-thumb img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.photo-thumb:hover img {
    transform: scale(1.05);
}

/* Keyframes for Photo Animation */
@keyframes fadeInScaleUp {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.photo-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.photo-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.photo-modal-img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.photo-modal-close {
    display: none; /* Hide the old close icon */
}

.photo-modal-close-btn {
    position: absolute; /* Position relative to the modal */
    top: 20px; /* Margin from the top */
    left: 20px; /* Margin from the left */
    width: 12px; /* Size like window controls */
    height: 12px; /* Size like window controls */
    background-color: #ff5f56; /* Red color for close */
    border: none;
    border-radius: 50%; /* Make it round */
    cursor: pointer;
    z-index: 10001; /* Ensure it's above the image */
    transition: background-color 0.1s ease;
    /* Remove old styles */
    /* margin-top: 20px; */
    /* padding: 10px 20px; */
    /* color: white; */
    /* font-size: 1em; */
    /* backdrop-filter: blur(5px); */
}

.photo-modal-close-btn:hover {
    opacity: 0.7; /* Dim on hover */
    background-color: #ff5f56; /* Keep color consistent */
}

/* Remove old photo styles */
.photo-single-view,
.photo-large-img,
.photo-controls,
.photo-next-btn {
    display: none;
}

/* Add specific window size for Notes app */
.window[data-app="notes"] {
    width: 700px !important;
    height: 400px !important;
    resize: none;
}

/* Notes App Styles */
.notes-app {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    width: 100%;
}

.notes-toolbar {
    padding: 12px;
    background: #f7f7f7;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.format-btn {
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    background: #ffffff;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #37352f;
}

.format-btn:hover {
    background: #f0f0f0;
    border-color: #d0d0d0;
}

.format-btn:active {
    background: #e8e8e8;
}

.notes-content {
    flex-grow: 1;
    padding: 24px;
    outline: none;
    overflow-y: auto;
    line-height: 1.6;
    color: #37352f;
}

.notes-content h1 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #37352f;
}

.notes-content h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 24px 0 16px;
    color: #37352f;
}

.notes-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 20px 0 14px;
    color: #37352f;
}

.notes-content p {
    margin-bottom: 16px;
    font-size: 16px;
}

.notes-content ul, .notes-content ol {
    margin: 16px 0;
    padding-left: 24px;
}

.notes-content li {
    margin-bottom: 8px;
}

.notes-content a {
    color: #2eaadc;
    text-decoration: none;
}

.notes-content a:hover {
    text-decoration: underline;
}

.send-btn {
    padding: 5px 10px;
    border: 1px solid #007bff;
    background: #007bff;
    color: white;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.1s ease;
    margin-left: auto; /* Push the button to the right */
}

.send-btn:hover {
    background: #0056b3;
    border-color: #0056b3;
}

/* Spotify App Styles */
.spotify-app {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 10px; /* Add padding around the content */
}

.spotify-app iframe {
    flex-grow: 1;
    border: none;
}

/* Doodle App Styles */
.doodle-app {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    height: 100%;
    position: relative;
    cursor: url('icons/pencil.cur'), auto !important;
}

.doodle-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255,255,255,0.95);
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
    cursor: default;
}

.doodle-hint {
    color: #888;
    font-size: 0.85em;
}

.doodle-save-btn {
    padding: 5px 14px;
    background: #6c5ce7;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.82em;
    cursor: pointer;
    transition: background 0.2s;
}

.doodle-save-btn:hover {
    background: #5a4bd1;
}

.doodle-save-btn:disabled {
    background: #27c93f;
    cursor: default;
}

.doodle-canvas-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    cursor: url('icons/pencil.cur'), auto !important;
}

.doodle-canvas-area canvas {
    border: 1px solid #ccc;
    background-color: #fff;
    cursor: url('icons/pencil.cur'), auto !important;
}

/* Name prompt overlay */
.doodle-name-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 0 0 10px 10px;
}

.doodle-name-dialog {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    width: 280px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.doodle-name-dialog p {
    font-size: 1em;
    font-weight: 600;
    color: #222;
    text-align: center;
    margin: 0;
}

.doodle-name-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95em;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.doodle-name-input:focus {
    border-color: #6c5ce7;
}

.doodle-name-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.doodle-name-cancel {
    padding: 6px 16px;
    background: #f0f0f0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.88em;
    transition: background 0.15s;
    font-family: inherit;
}

.doodle-name-cancel:hover {
    background: #e0e0e0;
}

.doodle-name-confirm {
    padding: 6px 16px;
    background: #6c5ce7;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.88em;
    transition: background 0.15s;
    font-family: inherit;
}

.doodle-name-confirm:hover {
    background: #5a4bd1;
}

/* Gallery App Styles */
.window[data-app="gallery"] {
    width: 600px !important;
    height: 500px !important;
    resize: none;
}

.gallery-app {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #f9f9f9;
}

.gallery-header {
    padding: 14px 18px 10px;
    background: #fff;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.gallery-title {
    font-size: 1.1em;
    font-weight: 700;
    color: #111;
}

.gallery-content {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    align-content: start;
}

.gallery-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #aaa;
    font-size: 0.95em;
    padding: 50px 0;
}

.gallery-item {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eee;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.15s;
}

.gallery-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.gallery-sketch {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.gallery-item-info {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gallery-item-name {
    font-size: 0.85em;
    font-weight: 600;
    color: #222;
}

.gallery-item-date {
    font-size: 0.75em;
    color: #999;
}

/* Calculator App Styles */
.calculator-app {
    display: flex;
    flex-direction: column;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.calculator-app h3 {
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
}

.calculator-app div {
    margin-bottom: 15px;
}

.calculator-app label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.calculator-app input[type="number"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.calculator-app .result {
    margin-top: 20px;
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
}

/* Games App Styles */
.games-app {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.games-app iframe {
    flex-grow: 1;
}

/* Modern Percentage Calculator Styles */
.modern-percentage-app {
    background: #181828;
    color: #fff;
    border-radius: 24px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    width: 340px;
    margin: 0 auto;
    padding: 32px 24px 24px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modern-percentage-app .calc-time {
    align-self: flex-end;
    font-size: 1.1em;
    opacity: 0.7;
    margin-bottom: 12px;
}

.modern-percentage-app .calc-amount {
    width: 100%;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 10px;
    outline: none;
    font-weight: 600;
}

.modern-percentage-app .calc-amount::placeholder {
    color: #aaa;
    opacity: 0.7;
}

.modern-percentage-app .calc-label {
    font-size: 1.1em;
    margin-bottom: 18px;
    opacity: 0.8;
}

.modern-percentage-app .calc-percentages {
    display: flex;
    gap: 18px;
    margin-bottom: 24px;
}

.modern-percentage-app .calc-percentage-btn {
    background: #23234a;
    color: #bcbcff;
    border: none;
    border-radius: 50%;
    width: 64px;
    height: 64px;
    font-size: 1.3em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.15s;
    outline: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modern-percentage-app .calc-percentage-btn.active {
    background: #6c63ff;
    color: #fff;
    transform: scale(1.12);
}

.modern-percentage-app .calc-result {
    margin-top: 10px;
    font-size: 1.2em;
    font-weight: 500;
    text-align: center;
    color: #bcbcff;
}

/* Apple Loading Overlay Styles */
#apple-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s;
}
#apple-loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
}
.apple-logo {
    height: 80px;
    width: auto;
    margin-bottom: 40px;
    filter: drop-shadow(0 0 6px #fff6);
    object-fit: contain;
    display: block;
}
#loading-message {
    color: #5C5C5C;
    font-size: 0.9em;
    text-align: center;
    margin-bottom: 48px;
}
.apple-loading-bar-bg {
    width: 240px;
    height: 8px;
    background: #222;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 10px;
    box-shadow: 0 2px 8px #000a;
}
.apple-loading-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #fff 60%, #bfcfff 100%);
    border-radius: 6px;
    transition: width 2.2s cubic-bezier(.4,0,.2,1);
}
#apple-start-btn {
    margin-top: 20px;
    padding: 10px 32px;
    background: #222;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: background 0.2s;
}
#apple-start-btn:hover {
    background: #444;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

/* Fortune Teller App Styles */
.fortune-app {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Align items to the top */
    background: #fff;
    padding: 40px; /* Adjusted padding around the content */
    margin: 0;
    overflow: hidden;
    position: relative;
}
.fortune-video {
    width: 500px; /* Set fixed width */
    height: auto;
    max-height: none;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: block;
    z-index: 0;
    margin-bottom: 20px;
}
.fortune-output {
    position: relative;
    z-index: 1;
    color: #000;
    font-size: 1.5em;
    font-weight: 500;
    text-align: center;
    margin-bottom: 30px; /* Increased margin to create space between text and button */
    background: none;
    padding: 0;
    border-radius: 0;
}
.fortune-cta {
    position: relative;
    z-index: 1;
    margin-bottom: 0;
    padding: 12px 32px;
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 24px;
    font-size: 1.2em;
    cursor: pointer;
    transition: background 0.2s;
}
.fortune-cta:hover {
    background: #388E3C;
}

/* Add specific window size for Photos app */
.window[data-app="photos"] {
    width: 700px !important;
    height: 700px !important;
    resize: none;
}

.window-content {
    padding: 0;
    height: calc(100% - 40px); /* Account for window header */
    overflow: hidden;
}

/* Remove Arc Browser Styles */
.browser-window,
.browser-toolbar,
.browser-controls,
.browser-control,
.browser-address-bar,
.browser-actions,
.browser-action,
.browser-url,
.browser-content,
.browser-sidebar,
.sidebar-item,
.browser-main {
    display: none;
}

/* Video Player Styles */
.video-player {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #000;
    color: #fff;
}

.video-container {
    flex-grow: 1;
    position: relative;
    background: #000;
    overflow: hidden;
}

.video-container video {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.video-controls {
    padding: 10px 15px; /* Adjusted padding */
    background: rgba(0, 0, 0, 0.6); /* More transparent background */
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: absolute; /* Position over the video */
    bottom: 0; /* Align to the bottom */
    left: 0;
    right: 0;
    z-index: 1; /* Ensure it's above the video */
}

.video-info {
    flex-grow: 1;
    color: #fff; /* White text */
    margin-bottom: 0; /* Remove bottom margin */
    padding-right: 10px; /* Add some space to the right of text */
}

.video-title {
    font-size: 1.1em; /* Slightly larger font size */
    font-weight: 600; /* Bolder font weight */
    margin-bottom: 2px; /* Reduced bottom margin */
    color: #fff;
}

.video-description {
    font-size: 0.9em; /* Slightly smaller font size */
    color: #ccc; /* Lighter grey color */
}

.video-actions {
    display: flex;
    gap: 5px; /* Reduced gap between buttons */
    align-items: center; /* Vertically align buttons */
}

.video-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px; /* Reduced padding */
    border-radius: 50%;
    color: #fff; /* White color for icons */
    transition: background-color 0.2s;
}

.video-action-btn:hover {
    background: rgba(255, 255, 255, 0.1); /* Subtle hover effect */
}

.video-action-btn svg {
    width: 18px; /* Smaller icon size */
    height: 18px; /* Smaller icon size */
    fill: currentColor;
}

/* ---- Multi-channel Chat App ---- */
.chat-app.channels-chat {
    display: flex;
    flex-direction: row;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 8px 8px;
}

/* Username Overlay */
.chat-username-overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 20, 30, 0.55);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    border-radius: 0 0 8px 8px;
}
.chat-username-modal {
    background: #fff;
    border-radius: 16px;
    padding: 30px 28px 24px;
    text-align: center;
    width: 260px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.22);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.chat-username-icon {
    font-size: 2rem;
    margin-bottom: 2px;
}
.chat-username-modal h3 {
    font-size: 1.05em;
    font-weight: 700;
    color: #111;
    margin: 0;
}
.chat-username-modal p {
    font-size: 0.88em;
    color: #666;
    margin: 0;
}
.chat-username-input {
    width: 100%;
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 0.95em;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
    text-transform: lowercase;
}
.chat-username-input:focus {
    border-color: #20903D;
}
.chat-username-submit {
    width: 100%;
    padding: 9px;
    border-radius: 8px;
    background: #20903D;
    color: #fff;
    border: none;
    font-size: 0.95em;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}
.chat-username-submit:hover {
    background: #176c2d;
}

/* Sidebar */
.chat-sidebar {
    width: 160px;
    min-width: 160px;
    background: #1a1d23;
    display: flex;
    flex-direction: column;
    height: 100%;
    flex-shrink: 0;
    border-radius: 0 0 0 8px;
}
.chat-sidebar-header {
    padding: 12px 12px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.chat-user-info {
    display: flex;
    align-items: center;
    gap: 7px;
}
.chat-user-avatar-dot {
    width: 8px;
    height: 8px;
    background: #23cc6d;
    border-radius: 50%;
    flex-shrink: 0;
}
.chat-user-name-display {
    font-size: 0.82em;
    color: #ddd;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chat-channel-list {
    padding: 12px 0 0;
    display: flex;
    flex-direction: column;
}
.chat-channel-section-label {
    font-size: 0.7em;
    color: #777;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0 14px 6px;
}
.chat-channel-item {
    padding: 7px 14px;
    font-size: 0.85em;
    color: #aaa;
    cursor: pointer;
    border-radius: 5px;
    margin: 0 6px 1px;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chat-channel-item:hover {
    background: rgba(255,255,255,0.07);
    color: #eee;
}
.chat-channel-item.active {
    background: rgba(32,144,61,0.25);
    color: #fff;
    font-weight: 600;
}

/* Main chat area */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f7f7f7;
    min-width: 0;
    border-radius: 0 0 8px 0;
}
.chat-main-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 10px 14px 8px;
    border-bottom: 1px solid #e8e8e8;
    background: #fff;
}
.chat-active-channel {
    font-size: 0.95em;
    font-weight: 700;
    color: #111;
}
.chat-channel-desc {
    font-size: 0.78em;
    color: #888;
}

/* Messages area */
.chat-messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px 6px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f7f7f7;
}
.chat-messages-area::-webkit-scrollbar { width: 3px; }
.chat-messages-area::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }

/* Message row */
.chat-msg {
    display: flex;
    align-items: flex-start;
    gap: 9px;
}
.chat-msg--own {
    flex-direction: row-reverse;
}
.chat-msg--own .chat-msg-meta {
    flex-direction: row-reverse;
}
.chat-msg--own .chat-msg-text {
    background: rgba(32, 144, 61, 0.18);
    border-radius: 14px 14px 4px 14px;
}
.chat-msg-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #aaa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78em;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    margin-top: 1px;
}
.ai-avatar {
    background: linear-gradient(135deg, #20903D, #0891B2);
    font-size: 0.68em;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.chat-msg-body {
    max-width: 75%;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.chat-msg-meta {
    display: flex;
    align-items: baseline;
    gap: 6px;
}
.chat-msg-name {
    font-size: 0.78em;
    font-weight: 700;
    color: #444;
}
.chat-msg-time {
    font-size: 0.7em;
    color: #aaa;
}
.chat-msg-text {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 4px 14px 14px 14px;
    padding: 7px 11px;
    font-size: 0.88em;
    line-height: 1.5;
    color: #222;
    word-break: break-word;
}
.chat-mention {
    background: rgba(32,144,61,0.12);
    color: #176c2d;
    border-radius: 3px;
    padding: 0 3px;
    font-weight: 600;
}

/* Tag / @mention suggestions */
.chat-tag-suggestions {
    display: none;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 5px;
    padding: 4px 10px;
    background: #fff;
    border-top: 1px solid #eee;
}
.chat-tag-suggestion {
    background: #f0f7f2;
    color: #176c2d;
    border: 1px solid #c7e8d1;
    border-radius: 20px;
    padding: 3px 11px;
    font-size: 0.8em;
    cursor: pointer;
    transition: background 0.15s;
    font-weight: 600;
}
.chat-tag-suggestion:hover {
    background: #d4f0de;
}

/* Input bar */
.chat-input-bar {
    display: flex;
    gap: 7px;
    padding: 8px 10px;
    background: #fff;
    border-top: 1px solid #eee;
    border-radius: 0 0 8px 0;
}
.chat-input {
    flex: 1;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 0.9em;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    background: #f9f9f9;
    min-width: 0;
    text-transform: lowercase;
}
.chat-input:focus {
    border-color: #20903D;
    background: #fff;
}
.chat-send-btn {
    padding: 0 14px;
    border-radius: 8px;
    background: #20903D;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}
.chat-send-btn:hover {
    background: #176c2d;
}
.chat-send-btn:disabled {
    background: #aaa;
    cursor: default;
}

/* Typing indicator */
.typing-dots::after {
    content: '...';
    animation: typingDots 1.2s steps(3, end) infinite;
}
@keyframes typingDots {
    0% { content: ''; }
    33% { content: '.'; }
    66% { content: '..'; }
    100% { content: '...'; }
}
.ai-typing {
    color: #888;
    font-style: italic;
}

/* Add specific window size for Chat app */
.window[data-app="chat"] {
    width: 660px !important;
    height: 480px !important;
    resize: none;
}

/* Store App Styles */
.window[data-app="store"] {
    width: 580px !important;
    height: 520px !important;
    resize: none;
}

.store-app {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fafafa;
    position: relative;
}

.store-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px 10px;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.store-title {
    font-size: 1.15em;
    font-weight: 700;
    color: #111;
    letter-spacing: -0.01em;
}

.store-cart-btn {
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 5px 12px;
    cursor: pointer;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #333;
    transition: background 0.15s, border-color 0.15s;
}

.store-cart-btn:hover {
    background: #f4f4f4;
    border-color: #ccc;
}

.store-cart-icon {
    font-size: 1.1em;
}

.store-cart-count {
    background: #ff6b6b;
    color: #fff;
    border-radius: 10px;
    padding: 1px 6px;
    font-size: 0.8em;
    font-weight: 600;
}

.store-body {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.store-products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 14px;
    overflow-y: auto;
    height: 100%;
}

.store-product-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: box-shadow 0.2s, transform 0.15s;
}

.store-product-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.store-product-emoji {
    font-size: 2em;
    line-height: 1;
}

.store-product-info {
    flex: 1;
}

.store-product-name {
    font-weight: 600;
    font-size: 0.9em;
    color: #222;
    margin-bottom: 2px;
}

.store-product-desc {
    font-size: 0.78em;
    color: #888;
}

.store-product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}

.store-product-price {
    font-weight: 700;
    font-size: 0.95em;
    color: #111;
}

.store-add-btn {
    background: #111;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 5px 14px;
    font-size: 0.82em;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.store-add-btn:hover {
    background: #333;
}

.store-add-btn--added {
    background: #27c93f !important;
    transform: scale(1.08);
}

/* Cart Panel */
.store-cart-panel {
    flex-direction: column;
    height: 100%;
    padding: 14px;
    gap: 10px;
    overflow: hidden;
}

.store-cart-title {
    font-size: 1em;
    font-weight: 700;
    color: #111;
    margin-bottom: 4px;
}

.store-cart-items {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.store-cart-empty {
    color: #aaa;
    font-size: 0.95em;
    text-align: center;
    margin-top: 30px;
}

.store-cart-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.store-cart-item-emoji {
    font-size: 1.3em;
    flex-shrink: 0;
}

.store-cart-item-name {
    flex: 1;
    font-size: 0.85em;
    color: #222;
    font-weight: 500;
}

.store-cart-item-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.store-qty-btn {
    background: #f0f0f0;
    border: none;
    border-radius: 6px;
    width: 22px;
    height: 22px;
    font-size: 1em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    line-height: 1;
}

.store-qty-btn:hover {
    background: #ddd;
}

.store-cart-item-qty {
    font-size: 0.9em;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

.store-cart-item-price {
    font-size: 0.85em;
    font-weight: 700;
    color: #333;
    min-width: 44px;
    text-align: right;
}

.store-cart-footer {
    border-top: 1px solid #eee;
    padding-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.store-cart-total {
    font-size: 0.95em;
    color: #555;
    font-weight: 500;
}

.store-cart-total span {
    font-weight: 700;
    color: #111;
}

.store-order-btn {
    background: #ff6b6b;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 8px 20px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.store-order-btn:hover {
    background: #ee5a24;
    transform: scale(1.03);
}

/* Confirmation screen */
.store-confirmation {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.97);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 10;
}

.store-confirmation-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.store-confirmation-emoji {
    font-size: 3.5em;
    animation: storePop 0.5s cubic-bezier(.4,0,.2,1);
}

@keyframes storePop {
    0% { transform: scale(0); opacity: 0; }
    80% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.store-confirmation-content h3 {
    font-size: 1.4em;
    font-weight: 700;
    color: #111;
}

.store-confirmation-content p {
    font-size: 0.95em;
    color: #666;
}

.store-continue-btn {
    margin-top: 10px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 9px 24px;
    font-size: 0.9em;
    cursor: pointer;
    transition: background 0.2s;
}

.store-continue-btn:hover {
    background: #333;
}


