* {
    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;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    cursor: url('icons/pencil.cur'), auto !important;
    position: relative;
}

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

.doodle-note {
    color: #888;
    font-size: 0.95em;
    position: absolute;
    top: 12px;
    right: 12px;
    margin: 0;
    background: rgba(255,255,255,0.7);
    padding: 2px 10px;
    border-radius: 8px;
    pointer-events: none;
    z-index: 2;
    text-transform: lowercase;
}

/* 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;
}

.chat-app {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-messages {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 12px 8px 12px;
    overflow-y: auto;
    background: #f7f7f7;
    scrollbar-width: thin;
    scrollbar-color: #bbb #f7f7f7;
}

.chat-messages::-webkit-scrollbar {
    width: 3px;
    background: #f7f7f7;
}
.chat-messages::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}
.chat-messages::-webkit-scrollbar-track {
    background: #f7f7f7;
}

.chat-form {
    display: flex;
    gap: 8px;
    padding: 8px;
    background: #f7f7f7;
    border-radius: 0 0 8px 8px;
}

.chat-input {
    flex: 1;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 15px;
}

.chat-form .send-btn {
    padding: 8px 18px;
    border-radius: 4px;
    font-size: 15px;
    background: #20903D;
    color: #fff;
    border: none;
    transition: background 0.2s;
}
.chat-form .send-btn:hover {
    background: #176c2d;
}

.typing-dots::after {
    content: '...';
    animation: typingDots 1.2s steps(3, end) infinite;
}
@keyframes typingDots {
    0% { content: ''; }
    33% { content: '.'; }
    66% { content: '..'; }
    100% { content: '...'; }
}

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

.bubble {
    display: inline-block;
    max-width: 80%;
    padding: 10px 16px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 2px;
    word-break: break-word;
}
.bubble.user {
    background: rgba(32, 144, 61, 0.3);
    color: #222;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    max-width: 80%;
}
.bubble.ai {
    background: #fff;
    color: #222;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid #e0e0e0;
    max-width: 70%;
}
.bubble.error {
    background: #ffeaea;
    color: #d32f2f;
    border: 1px solid #f8bcbc;
    align-self: flex-start;
}
.ai-typing {
    color: #888;
    font-style: italic;
    align-self: flex-start;
    margin-left: 8px;
}


