/* --- General Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Ubuntu', Arial, sans-serif; /* Ensure Ubuntu font is loaded or use fallback */
}

body {
    background-color: #300a24;
    color: #ffffff;
    overflow: hidden;
    height: 100vh;
    position: relative;
    /* Default cursor for the simulator area */
    cursor: default;
    user-select: none; /* Prevent text selection globally */
}

/* --- Login Screen --- */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2c001e 0%, #5e2750 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s;
}

.login-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.login-logo {
    width: 150px;
    margin-bottom: 30px;
}

.login-form {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    width: 350px;
    text-align: center;
}

.login-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: none;
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 16px;
    user-select: text; /* Allow selecting text in input */
}

.login-form input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.login-form button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    background-color: #e95420;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-form button:hover {
    background-color: #ff6a3a;
}

/* --- Desktop --- */
.desktop {
    display: none;
    width: 100%;
    height: 100%;
    position: relative;
    background: url('https://assets.ubuntu.com/v1/8e6131b3-desktop-background-gradients-22-04.jpg') no-repeat center center;
    background-size: cover;
}

/* --- Top Bar --- */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center; /* Center time */
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(5px);
}

.time {
    font-size: 14px;
    color: white;
}

/* --- Dock --- */
.dock {
    position: fixed;
    right: 10px; /* Changed from left to right */
    top: 50%;
    transform: translateY(-50%);
    width: 70px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 10px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    z-index: 100;
    backdrop-filter: blur(5px);
}

.dock-item {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    background-color: rgba(255, 255, 255, 0.1);
    position: relative; /* Needed for running indicator */
}

.dock-item:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.dock-item.active {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Indicator for running/open apps */
.dock-item .running-indicator {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background-color: #e95420;
    border-radius: 50%;
    display: none; /* Hidden by default */
}

.dock-item.open .running-indicator {
    display: block; /* Show when app is open */
}

.dock-item i {
    font-size: 24px;
    color: white;
}

.dock-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    pointer-events: none; /* Prevent image drag interference */
}

/* --- Windows --- */
.window {
    position: absolute;
    top: 50px;
    left: 100px;
    width: 800px;
    height: 500px;
    background-color: #f6f6f6; /* Slightly off-white */
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    display: none; /* Initially hidden */
    flex-direction: column;
    overflow: hidden; /* Important for content clipping */
    z-index: 10; /* Base z-index */
    color: #333;
    resize: both; /* Allow resizing (basic) */
    min-width: 250px; /* Minimum size */
    min-height: 150px;
}

.window.active {
    display: flex;
    /* z-index will be managed by JS */
}

.window.minimized {
    display: none; /* Hide when minimized */
}

.window.maximized { /* Style for maximized state */
     top: 30px !important;
     left: 0 !important;
     width: 100% !important;
     height: calc(100vh - 30px) !important;
     border-radius: 0;
     resize: none; /* Disable resize when maximized */
     box-shadow: none; /* Remove shadow when maximized */
}

.window-header {
    height: 40px;
    background-color: #e0e0e0; /* Lighter gray */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    cursor: move; /* Move cursor for header */
    user-select: none;
    flex-shrink: 0; /* Prevent header from shrinking */
    border-bottom: 1px solid #ccc;
}
 .window.maximized .window-header {
     border-radius: 0;
 }


.window-title {
    font-weight: bold;
    color: #333;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

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

.window-control {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    cursor: pointer;
    background-size: contain; /* Optional: use background images */
}

.window-control.close { background-color: #ff5f56; }
.window-control.minimize { background-color: #ffbd2e; }
.window-control.maximize { background-color: #27c93f; }

.window-content {
    flex-grow: 1; /* Allow content to fill space */
    overflow: auto; /* Scroll if content overflows */
    display: flex; /* Use flex for internal layout */
    flex-direction: column; /* Default content direction */
    background-color: #ffffff; /* Default white background */
    user-select: text; /* Allow selecting text in content areas */
}
/* Allow selection in specific elements inside content */
.window-content input, .window-content textarea, .editor-content, .terminal-content-wrapper, .calculator-display {
    user-select: text;
}
 .window-content button, .window-content .file-item, .window-content .app-launcher-item, .settings-category li {
      user-select: none; /* Keep buttons etc. non-selectable */
  }

/* --- Specific Window Content Styles --- */

/* Browser */
.browser-toolbar {
    display: flex;
    padding: 8px;
    background-color: #eee; /* Slightly different shade */
    border-bottom: 1px solid #ccc;
    flex-shrink: 0;
    align-items: center;
}
.browser-toolbar button {
    background: none;
    border: none;
    font-size: 16px;
    padding: 5px 8px;
    cursor: pointer;
    color: #555;
}
.browser-toolbar button:hover { color: #000; }
.browser-url-bar {
    flex-grow: 1;
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 20px;
    margin: 0 10px;
    font-size: 14px;
}
.browser-content { /* iframe */
    flex-grow: 1;
    border: none;
    background-color: white; /* Show while loading */
}
#browserError {
    padding: 20px;
    text-align: center;
    color: #888;
    display: none; /* Hidden by default */
}

/* Editor */
.editor-toolbar {
    padding: 5px 8px;
    background-color: #eee;
    border-bottom: 1px solid #ccc;
    flex-shrink: 0;
    display: flex;
    gap: 5px;
}
 .editor-toolbar button {
    background: none;
    border: 1px solid transparent;
    font-size: 14px;
    padding: 4px 8px;
    cursor: pointer;
    color: #333;
    border-radius: 3px;
 }
 .editor-toolbar button:hover { background-color: #ddd; border-color: #ccc; }
 .editor-toolbar button.active { background-color: #ccc; }
.editor-content {
    flex-grow: 1;
    padding: 15px;
    font-family: 'Monaco', 'Menlo', monospace; /* Monospace font */
    white-space: pre-wrap; /* Wrap text */
    overflow: auto;
    background-color: #fafafa;
    color: #333;
    outline: none; /* Remove focus outline */
}

/* Terminal */
.terminal-header { /* Optional: Header inside content */
    padding: 5px 10px;
    background-color: #444;
    color: white;
    font-family: monospace;
    flex-shrink: 0;
}
.terminal-content-wrapper {
    flex-grow: 1;
    background-color: #000;
    color: #0f0;
    font-family: monospace;
    overflow-y: scroll; /* Scroll only vertically */
     padding: 10px;
}
 .terminal-content-wrapper div { /* Wrap output lines */
     white-space: pre-wrap;
     word-wrap: break-word;
 }
.terminal-input-line {
    display: flex;
    background-color: #000;
    padding: 5px 10px;
    border-top: 1px solid #333;
    flex-shrink: 0;
}
.terminal-prompt {
    color: #0f0;
    margin-right: 5px;
    white-space: nowrap;
}
.terminal-command {
    flex-grow: 1;
    background-color: transparent;
    border: none;
    color: #0f0;
    font-family: monospace;
    outline: none;
    width: 100%; /* Ensure it tries to take full width */
}

/* Files */
.files-toolbar {
     padding: 5px 8px;
     background-color: #eee;
     border-bottom: 1px solid #ccc;
     flex-shrink: 0;
     display: flex;
     gap: 5px;
     align-items: center;
 }
 .files-toolbar button {
     background: none;
     border: 1px solid transparent;
     font-size: 14px;
     padding: 4px 8px;
     cursor: pointer;
     color: #333;
     border-radius: 3px;
 }
 .files-toolbar button:hover { background-color: #ddd; border-color: #ccc; }

.files-content {
    flex-grow: 1;
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-content: flex-start; /* Align items to top */
     overflow: auto;
     cursor: default; /* Default cursor for empty area */
}
.file-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    text-align: center;
    user-select: none;
}
.file-item:hover {
    background-color: rgba(0, 0, 0, 0.1);
}
.file-item img {
    width: 50px;
    height: 50px;
    margin-bottom: 5px;
     object-fit: contain;
     pointer-events: none; /* Prevent img interfering with selection */
}
.file-item span {
    font-size: 12px;
    color: #333;
    word-break: break-word; /* Break long names */
     display: block;
     width: 100%;
     pointer-events: none;
}
 .file-item.selected {
     background-color: rgba(0, 120, 215, 0.3); /* Selection highlight */
     border: 1px solid rgba(0, 120, 215, 0.5);
 }

 /* Calculator */
 .calculator-content {
     display: grid;
     grid-template-columns: repeat(4, 1fr);
     gap: 5px;
     padding: 15px;
     height: 100%; /* Fill window */
     background-color: #d0d0d0;
 }
 .calculator-display {
     grid-column: 1 / -1; /* Span all columns */
     background-color: #e8e8e8;
     color: #333;
     font-size: 28px;
     padding: 10px 15px;
     text-align: right;
     border-radius: 5px;
     margin-bottom: 10px;
     overflow: hidden;
     text-overflow: ellipsis;
     white-space: nowrap;
 }
 .calculator-content button {
     padding: 15px;
     font-size: 18px;
     border: none;
     border-radius: 5px;
     background-color: #f0f0f0;
     cursor: pointer;
     transition: background-color 0.2s;
 }
 .calculator-content button:hover { background-color: #e0e0e0; }
 .calculator-content button.operator { background-color: #ff9500; color: white; }
 .calculator-content button.operator:hover { background-color: #e08500; }
 .calculator-content button.clear { background-color: #ff3b30; color: white; }
 .calculator-content button.clear:hover { background-color: #d03024; }
 .calculator-content button.equals { background-color: #34c759; color: white; grid-column: 4 / 5; grid-row: 5 / 7; }
 .calculator-content button.equals:hover { background-color: #2ca349; }
 .calculator-content button.zero { grid-column: 1 / 3; } /* Span two columns */

 /* Settings */
 .settings-category-list {
     list-style: none;
     padding: 0;
     margin: 0;
 }
 .settings-category-list li {
     padding: 8px 12px;
     cursor: pointer;
     border-radius: 4px;
     margin-bottom: 5px;
     transition: background-color 0.2s;
     display: flex;
     align-items: center;
 }
 .settings-category-list li:hover {
     background-color: #e5e5e5;
 }
 .settings-category-list li.active-setting {
     background-color: #d0d0d0;
     font-weight: bold;
 }
 .settings-category-list li i {
      margin-left: 10px; /* RTL: use margin-left */
      width: 18px; /* Ensure consistent icon width */
      text-align: center;
  }
 .settings-content-area {
      padding-left: 20px; /* RTL: add padding to the left of content */
  }
 .settings-content-area h3 i {
     margin-left: 8px;
 }


 /* Image Viewer */
 #imageViewerWindow .window-content {
     display: flex;
     flex-direction: column;
     align-items: center;
     justify-content: space-between;
     background-color: #333; /* Dark background for viewer */
     padding: 0; /* Remove padding if toolbar/img handles it */
     overflow: hidden; /* Prevent content overflow */
 }
 .image-viewer-toolbar {
     padding: 10px;
     background-color: #444;
     width: 100%;
     text-align: center;
     flex-shrink: 0;
     border-bottom: 1px solid #555;
 }
  .image-viewer-toolbar button {
      background-color: #555;
      color: white;
      border: none;
      padding: 6px 12px;
      border-radius: 4px;
      cursor: pointer;
      margin: 0 5px;
  }
  .image-viewer-toolbar button:hover {
      background-color: #666;
  }
 .image-viewer-main {
     flex-grow: 1;
     display: flex;
     justify-content: center;
     align-items: center;
     width: 100%;
     overflow: hidden; /* Hide scrollbars if image is too large */
     padding: 10px; /* Padding around image */
     position: relative; /* For error message positioning */
 }
  #viewerImage {
      max-width: 100%;
      max-height: 100%;
      object-fit: contain; /* Scale image while preserving aspect ratio */
      display: block; /* Remove extra space below image */
  }
 #imgError {
      position: absolute;
      bottom: 10px;
      left: 50%;
      transform: translateX(-50%);
      background-color: rgba(255, 0, 0, 0.7);
      color: white;
      padding: 5px 10px;
      border-radius: 4px;
      display: none; /* Hidden by default */
  }


/* --- Desktop Icons --- */
.desktop-icons {
    position: absolute;
    top: 50px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 1;
}

.desktop-icon {
    user-select: none; /* Prevent text selection on icon */
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    cursor: pointer;
    padding: 5px;
     border: 1px solid transparent; /* For selection outline */
     border-radius: 3px;
}
.desktop-icon.selected {
    background-color: rgba(255, 255, 255, 0.3);
     border: 1px dashed rgba(255, 255, 255, 0.7);
}

.desktop-icon img {
    width: 50px;
    height: 50px;
     margin-bottom: 5px;
     pointer-events: none; /* Make image non-draggable/clickable for selection */
}

.desktop-icon span {
    color: white;
    text-align: center;
    font-size: 13px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
     pointer-events: none;
}

/* --- Selection Rectangle --- */
#selectionRectangle {
    position: absolute;
    border: 1px dashed #fff;
    background-color: rgba(255, 255, 255, 0.2);
    z-index: 999;
    pointer-events: none; /* Don't interfere with mouse events */
    display: none; /* Hidden initially */
}

/* --- App Launcher Window --- */
 #launcherWindow .window-content {
     padding: 20px;
     display: flex;
     flex-wrap: wrap;
     gap: 30px;
     justify-content: flex-start; /* Align to start */
     align-items: flex-start;
     background-color: #f6f6f6;
     overflow-y: auto;
 }
 #launcherWindow .app-launcher-item {
     text-align: center;
     cursor: pointer;
     width: 80px;
     padding: 10px;
     border-radius: 5px;
     transition: background-color 0.2s;
     user-select: none;
 }
  #launcherWindow .app-launcher-item:hover {
      background-color: rgba(0,0,0,0.1);
  }
 #launcherWindow .app-launcher-item img {
     width: 50px; /* Smaller icons */
     height: 50px;
     margin-bottom: 5px;
     pointer-events: none;
 }
  #launcherWindow .app-launcher-item span {
      font-size: 13px;
      color: #333;
      pointer-events: none;
  }

/* Optional: Styles for the particles canvas if you keep it visually distinct */
#particlesCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5; /* Ensure it's behind interactive elements but above desktop background */
    opacity: 0.5; /* Adjust as needed */
}
/* أنماط تطبيق الموسيقى */
.music-player {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: #f5f5f5; /* Light grey background for the player */
  color: #333; /* Default text color */
}

.music-info {
  text-align: center;
  padding: 20px;
  flex-shrink: 0;
  border-bottom: 1px solid #e0e0e0; /* Separator line */
}

.music-info img.album-art { /* Style for album art if you add one */
    width: 150px;
    height: 150px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    object-fit: cover;
}

.music-info .song-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.music-info .artist-name {
    font-size: 14px;
    color: #666;
}

.music-controls {
  display: flex;
  justify-content: center;
  align-items: center; /* Vertically align buttons */
  gap: 20px;
  padding: 15px;
  flex-shrink: 0;
  background-color: #efefef; /* Slightly different background for controls area */
}

.music-controls button {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #555; /* Darker grey for icons */
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, color 0.2s; /* Smooth transition */
}

.music-controls button:hover {
  background-color: rgba(0,0,0,0.1);
}

.music-controls button#musicPlayBtn { /* Specific style for play/pause button */
  background-color: #e95420; /* Ubuntu orange */
  color: white;
  font-size: 28px; /* Slightly larger play icon */
}
.music-controls button#musicPlayBtn:hover {
  background-color: #d6440a; /* Darker orange on hover */
}


.music-progress {
  width: 100%;
  padding: 10px 20px; /* More padding */
  flex-shrink: 0;
  display: flex; /* To align time and progress bar */
  align-items: center;
  gap: 10px;
}

.music-progress input[type="range"] { /* Style for the progress bar */
    flex-grow: 1;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: #ddd;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
}

.music-progress input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #e95420;
    border-radius: 50%;
    cursor: pointer;
}

.music-progress input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #e95420;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}


.music-time { /* For current time / total time display */
  font-size: 12px;
  color: #666;
  min-width: 70px; /* To prevent layout shift, e.g., "0:00 / 0:00" */
  text-align: center;
}


.music-playlist {
  flex-grow: 1;
  overflow-y: auto;
  list-style: none;
  padding: 0;
  margin: 0;
  background-color: #fff; /* White background for playlist area */
}

.music-playlist li {
  padding: 12px 15px; /* Slightly more padding */
  border-bottom: 1px solid #eee;
  cursor: pointer;
  display: flex; /* For better alignment of potential elements like track number, title, duration */
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s;
}

.music-playlist li:hover {
  background-color: rgba(233, 84, 32, 0.05); /* Light orange tint on hover */
}

.music-playlist li.active-song { /* Style for the currently playing song */
    background-color: rgba(233, 84, 32, 0.15);
    font-weight: bold;
    color: #e95420;
}

.music-playlist .playlist-song-title {
    flex-grow: 1;
}
.music-playlist .playlist-song-duration {
    font-size: 12px;
    color: #777;
    margin-left: 10px;
}


/* أنماط تطبيق التقويم */
.calendar-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: #fff; /* White background */
  color: #333;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px; /* More horizontal padding */
  background-color: #f0f0f0;
  font-weight: bold;
  border-bottom: 1px solid #ddd;
  flex-shrink: 0; /* Prevent shrinking */
}
.calendar-header button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #555;
    padding: 5px;
}
.calendar-header button:hover {
    color: #e95420;
}
#currentMonthYear {
    font-size: 18px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px; /* Thinner gap, or use borders */
  padding: 10px;
  flex-grow: 1;
  background-color: #e0e0e0; /* Background for the grid lines */
}

.calendar-day-name {
  text-align: center;
  font-weight: bold;
  padding: 8px 5px; /* Adjust padding */
  background-color: #f5f5f5;
  font-size: 13px; /* Slightly smaller day names */
  color: #555;
}

.calendar-day {
  text-align: center;
  padding: 10px 5px; /* Adjust padding */
  cursor: pointer;
  border-radius: 3px;
  background-color: #fff; /* Each day cell is white */
  transition: background-color 0.2s, color 0.2s;
  position: relative; /* For event indicators */
  min-height: 60px; /* Ensure days have some height */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.calendar-day:hover {
  background-color: rgba(233, 84, 32, 0.1);
}

.calendar-day.selected {
  background-color: #e95420;
  color: white;
}

.calendar-day.today {
  /* border: 1px solid #e95420; No border, use background or font weight */
  font-weight: bold;
  color: #e95420;
}
.calendar-day.today.selected {
    color: white; /* Ensure selected today text is white */
}


.calendar-day.other-month { /* Days not in the current month */
    color: #aaa;
    cursor: default;
}
.calendar-day.other-month:hover {
    background-color: #fff; /* No hover effect for other month days */
}


.calendar-day.empty { /* If you need explicitly empty cells */
  background-color: transparent;
  cursor: default;
}
.calendar-day.empty:hover {
    background-color: transparent;
}

.calendar-events {
  padding: 15px 20px; /* More padding */
  border-top: 1px solid #ddd;
  background-color: #f9f9f9; /* Light background for events section */
  flex-shrink: 0; /* Prevent shrinking */
  max-height: 150px; /* Limit height and make scrollable if many events */
  overflow-y: auto;
}
.calendar-events h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    color: #333;
}
.calendar-events ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.calendar-events li {
    padding: 5px 0;
    font-size: 14px;
    color: #555;
}


/* أنماط تطبيق الطقس */
.weather-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px;
  background-color: #fff; /* White background */
  color: #333;
  align-items: center; /* Center content horizontally */
}

.weather-location {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
}

.weather-current {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 30px; /* More space */
  background-color: #f9f9f9; /* Light card background */
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  width: 100%;
  max-width: 300px; /* Max width for current weather card */
}

.weather-icon { /* This can be an <i> or <img> */
  font-size: 60px; /* Larger icon */
  color: #e95420;
  margin: 10px 0 15px 0; /* Adjust margins */
}
.weather-icon img {
    width: 60px;
    height: 60px;
}

.weather-temp {
  font-size: 48px; /* Larger temperature */
  font-weight: bold;
}

.weather-desc {
  font-size: 20px; /* Larger description */
  color: #555; /* Slightly darker */
  margin-top: 5px;
  text-transform: capitalize;
}

.weather-details {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}
.weather-details div {
    text-align: center;
}
.weather-details i {
    margin-right: 5px;
}

.weather-forecast {
  display: flex;
  justify-content: space-around; /* Space out forecast days */
  margin-top: 20px;
  width: 100%;
  gap: 10px; /* Gap between forecast items */
}

.weather-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px 10px; /* Adjust padding */
  border-radius: 8px; /* More rounded */
  background-color: rgba(233, 84, 32, 0.08); /* Lighter orange tint */
  flex: 1; /* Allow days to grow equally */
  min-width: 80px; /* Minimum width for each day */
  text-align: center;
}
.weather-day .forecast-day-name {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 5px;
}
.weather-day .forecast-icon {
    font-size: 28px;
    color: #e95420;
    margin: 5px 0;
}
.weather-day .forecast-icon img {
    width: 30px;
    height: 30px;
}
.weather-day .forecast-temp {
    font-size: 16px;
    margin-top: 5px;
}

/* أنماط تطبيق البريد الإلكتروني */
.email-container {
  display: flex;
  height: 100%;
  background-color: #fff; /* White background */
}

.email-sidebar { /* New: For Compose button and folders */
    width: 220px;
    border-right: 1px solid #ddd;
    padding: 15px;
    display: flex;
    flex-direction: column;
    background-color: #f9f9f9;
}
.email-compose-btn {
    background-color: #e95420;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 20px; /* Pill shape */
    text-align: center;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 20px;
    transition: background-color 0.2s;
}
.email-compose-btn:hover {
    background-color: #d6440a;
}
.email-compose-btn i {
    margin-left: 8px; /* RTL */
}

.email-folders {
    list-style: none;
    padding: 0;
    margin: 0;
}
.email-folders li {
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}
.email-folders li:hover {
    background-color: #e0e0e0;
}
.email-folders li.active {
    background-color: #e95420;
    color: white;
}
.email-folders li i {
    margin-left: 10px; /* RTL */
    width: 18px;
    text-align: center;
}


.email-list {
  width: 300px;
  border-right: 1px solid #ddd; /* Slightly darker border */
  overflow-y: auto;
}
.email-list-header { /* For search or filter options */
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
    background-color: #f5f5f5;
}
.email-list-header input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}


.email-item {
  padding: 15px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background-color 0.2s;
}

.email-item:hover {
  background-color: rgba(233, 84, 32, 0.05); /* Light orange tint */
}
.email-item.active-email {
    background-color: rgba(233, 84, 32, 0.1);
    border-right: 3px solid #e95420; /* Indicator for selected email */
}
.email-item-sender {
    font-weight: bold;
    margin-bottom: 3px;
    color: #333;
}
.email-item-subject {
    font-size: 14px;
    color: #555;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.email-item-preview {
    font-size: 13px;
    color: #777;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.email-view {
  flex-grow: 1;
  padding: 25px; /* More padding */
  overflow-y: auto;
  background-color: #fff;
}
.email-view-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}
.email-view-toolbar button {
    background: none;
    border: 1px solid #ccc;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    color: #555;
    font-size: 13px;
}
.email-view-toolbar button:hover {
    background-color: #f0f0f0;
    border-color: #bbb;
}
.email-view-toolbar button i {
    margin-left: 5px; /* RTL */
}


.email-header {
  margin-bottom: 20px;
  padding-bottom: 15px; /* Adjust padding */
  border-bottom: 1px solid #eee;
}
.email-subject-view {
    font-size: 22px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.email-meta {
  display: flex;
  justify-content: space-between;
  align-items: center; /* Align items vertically */
  color: #666;
  font-size: 14px;
  margin-top: 10px;
}
.email-meta .sender-info {
    display: flex;
    align-items: center;
}
.email-meta .sender-avatar { /* If you add avatars */
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #ccc;
    margin-left: 10px; /* RTL */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}
.email-meta .email-date {
    font-size: 13px;
}

.email-body {
    font-size: 15px;
    line-height: 1.7;
    color: #444;
}


/* أنماط تطبيق الخرائط */
.map-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: #e5e3df; /* Typical map background color */
}

.map-search {
  display: flex;
  gap: 10px; /* Gap between input and button */
  padding: 10px;
  background-color: #f5f5f5;
  border-bottom: 1px solid #ddd;
  flex-shrink: 0;
}

.map-search input {
  flex-grow: 1;
  padding: 10px; /* More padding */
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}
.map-search button {
    padding: 10px 15px;
    border: none;
    background-color: #e95420;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.map-search button:hover {
    background-color: #d6440a;
}

.map-placeholder { /* This is where the actual map (e.g., Leaflet, Google Maps iframe) would go */
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #777; /* Darker grey */
  font-size: 16px;
  position: relative; /* For potential map elements */
}
.map-placeholder i { /* Placeholder icon */
    font-size: 60px;
    color: #bbb;
    margin-bottom: 15px;
}

.map-coords { /* If you show coordinates */
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-size: 12px;
  color: #fff;
  background-color: rgba(0,0,0,0.5);
  padding: 3px 6px;
  border-radius: 3px;
}

/* أنماط تطبيق جهات الاتصال */
.contacts-container {
  display: flex;
  height: 100%;
  background-color: #fff;
}

.contacts-list {
  width: 280px; /* Slightly narrower */
  border-right: 1px solid #ddd; /* Darker border */
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.contact-search {
  padding: 10px 15px; /* Adjust padding */
  background-color: #f5f5f5;
  border-bottom: 1px solid #ddd;
  flex-shrink: 0;
}
.contact-search input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
}

.contact-items-scroll { /* Wrapper for scrollable contact items */
    flex-grow: 1;
    overflow-y: auto;
}

.contact-item {
  padding: 12px 15px; /* Adjust padding */
  border-bottom: 1px solid #eee;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px; /* Gap between avatar and info */
  transition: background-color 0.2s;
}

.contact-item:hover {
  background-color: rgba(233, 84, 32, 0.05);
}
.contact-item.active-contact {
    background-color: rgba(233, 84, 32, 0.1);
}

.contact-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ccc;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
}
.contact-info .contact-name {
    font-weight: bold;
    color: #333;
}
.contact-info .contact-extra { /* For phone or email preview */
    font-size: 13px;
    color: #777;
}

.contact-view {
  flex-grow: 1;
  padding: 25px; /* More padding */
  overflow-y: auto;
}
.contact-view-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}
.contact-view-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #e0e0e0;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 32px;
    margin-left: 20px; /* RTL */
}
.contact-view-name {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}
.contact-view-actions button {
    background: none;
    border: 1px solid #ccc;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    margin-left: 10px; /* RTL */
    font-size: 13px;
    color: #555;
}
.contact-view-actions button:hover {
    background-color: #f0f0f0;
}


.contact-details {
  margin-top: 20px;
}

.contact-details div {
  margin-bottom: 15px; /* More space between details */
  font-size: 15px;
}
.contact-details strong { /* Label for the detail */
    display: block;
    font-size: 13px;
    color: #777;
    margin-bottom: 3px;
}
.contact-details span { /* Value of the detail */
    color: #444;
}

/* أنماط تطبيق المهام */
.tasks-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: #fff;
}

.tasks-header {
  padding: 15px;
  background-color: #f5f5f5;
  display: flex;
  gap: 10px; /* Gap between input and button */
  border-bottom: 1px solid #ddd;
  flex-shrink: 0;
}

.new-task-input {
  flex-grow: 1;
  padding: 10px; /* More padding */
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}
.add-task-btn {
    padding: 10px 15px;
    border: none;
    background-color: #e95420;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}
.add-task-btn:hover {
    background-color: #d6440a;
}

.tasks-list {
  flex-grow: 1;
  overflow-y: auto;
  padding: 0; /* Remove padding if task-item has its own */
  margin: 0;
  list-style: none; /* If using <ul> */
}

.task-item {
  display: flex;
  align-items: center;
  padding: 12px 15px; /* Adjust padding */
  border-bottom: 1px solid #eee;
  transition: background-color 0.2s;
}
.task-item:hover {
    background-color: #f9f9f9;
}

.task-item.completed span {
  text-decoration: line-through;
  color: #999;
}

.task-item input[type="checkbox"] {
  margin-right: 10px; /* RTL: should be margin-left if checkbox is first */
  margin-left: 0;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.task-item span {
  flex-grow: 1;
  font-size: 15px;
  color: #444;
  cursor: text; /* If you allow inline editing */
}

.task-item button.delete-task-btn { /* Specific class for delete button */
  background: none;
  border: none;
  color: #aaa;
  cursor: pointer;
  font-size: 16px;
  padding: 5px;
  margin-right: 0; /* RTL: for button at the end */
  margin-left: 5px;
  flex-shrink: 0;
  transition: color 0.2s;
}

.task-item button.delete-task-btn:hover {
  color: #e95420; /* Red for delete */
}

/* أنماط تطبيق الكتب */
.books-container {
  height: 100%;
  overflow-y: auto;
  padding: 20px; /* More padding */
  background-color: #f9f9f9; /* Light background */
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 25px; /* More gap */
}

.book-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  background-color: #fff;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}
.book-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.book-item img {
  width: 120px;
  height: 180px; /* Slightly taller for typical book aspect ratio */
  object-fit: cover;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15); /* Softer shadow */
  margin-bottom: 12px; /* More margin */
  border-radius: 4px;
}

.book-title {
  font-weight: bold;
  text-align: center;
  font-size: 14px; /* Slightly smaller */
  color: #333;
  margin-bottom: 3px;
}

.book-author {
  font-size: 12px;
  color: #777; /* Darker grey */
  text-align: center;
}

/* أنماط تطبيق الألعاب */
.games-container {
  height: 100%;
  overflow-y: auto;
  padding: 20px;
  background-color: #303030; /* Dark background for games */
  color: #fff;
}
.games-container h3 { /* Title for games section */
    text-align: center;
    margin-bottom: 20px;
    color: #fff;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 20px;
}

.game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 15px;
  border-radius: 10px;
  background-color: #424242; /* Darker card for games */
  transition: background-color 0.2s, transform 0.2s;
}
.game-item:hover {
    background-color: #505050;
    transform: scale(1.05);
}

.game-icon { /* This could be an <img> or an <i> with a background color */
  width: 70px; /* Larger icon */
  height: 70px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 30px; /* Larger font icon */
  margin-bottom: 10px;
  /* If using background colors for icons, set them here or via JS */
  background-color: #e95420; /* Default example */
}
.game-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
}

.game-name {
  text-align: center;
  font-size: 14px;
  color: #eee; /* Lighter text for dark background */
}

/* أنماط تطبيق الكاميرا */
.camera-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: #000; /* Black background for camera app */
}

.camera-view {
  flex-grow: 1;
  background-color: #111; /* Very dark grey for viewfinder area */
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden; /* If using a <video> element */
}
.camera-view video { /* Style for the actual video feed */
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.camera-placeholder-text { /* If no camera feed */
    color: #555;
    font-size: 18px;
}

.camera-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 15px; /* More vertical padding */
  background-color: #222; /* Dark controls bar */
  gap: 20px;
  flex-shrink: 0;
}

.camera-controls button {
  padding: 10px;
  width: 60px; /* Square buttons */
  height: 60px;
  border: 2px solid #555; /* Border for buttons */
  border-radius: 50%; /* Circular buttons */
  background-color: #333; /* Dark button background */
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px; /* Icon size */
  transition: background-color 0.2s, border-color 0.2s;
}
.camera-controls button:hover {
    background-color: #444;
    border-color: #777;
}
.camera-controls button#takePhotoBtn { /* Shutter button */
    background-color: #e95420;
    border-color: #e95420;
    width: 70px;
    height: 70px;
}
.camera-controls button#takePhotoBtn:hover {
    background-color: #d6440a;
    border-color: #d6440a;
}


.photo-output { /* For displaying the taken photo */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.8); /* Semi-transparent overlay */
  display: none; /* Hidden by default */
  justify-content: center;
  align-items: center;
  z-index: 10; /* Above camera view */
}

.photo-output img {
  max-width: 90%; /* Leave some space around the image */
  max-height: 90%;
  border: 3px solid white;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}
.photo-output button.close-photo { /* Button to close the photo preview */
    position: absolute;
    top: 20px;
    right: 20px; /* RTL: left: 20px; */
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    font-size: 20px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
}

/* أنماط تطبيق المساعدة */
.help-container {
  height: 100%;
  overflow-y: auto;
  padding: 20px;
  background-color: #fff; /* White background */
  color: #333;
}

.help-container h3 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 20px;
    color: #e95420; /* Ubuntu orange for title */
}
.help-container .help-intro {
    text-align: center;
    color: #555;
    margin-bottom: 25px;
    font-size: 15px;
}

.help-search-bar {
    display: flex;
    margin-bottom: 25px;
}

.help-search-bar input {
    flex-grow: 1;
    padding: 12px; /* More padding */
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 15px;
}

.help-apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); /* Slightly wider items */
  gap: 20px; /* More gap */
  margin-top: 20px;
}

.help-app { /* Represents a help topic or link to an app's help */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* Center content vertically */
  padding: 15px;
  border-radius: 8px;
  background-color: #f9f9f9; /* Light grey base background */
  cursor: pointer;
  transition: background-color 0.2s, box-shadow 0.2s, transform 0.2s;
  text-align: center;
  min-height: 100px; /* Ensure items have some height */
  border: 1px solid #eee;
}

.help-app:hover {
  background-color: #f0f0f0; /* Slightly darker on hover */
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  transform: translateY(-2px);
}

.help-app i { /* For an icon if used (e.g., FontAwesome) */
    font-size: 36px; /* Larger icon */
    color: #e95420; /* Ubuntu orange for icon */
    margin-bottom: 10px;
}
.help-app img { /* Alternative for image icon */
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin-bottom: 10px;
}

.help-app span { /* For the name of the app/topic */
  font-size: 14px;
  color: #444; /* Darker text */
  font-weight: 500;
}

/* Styles for a potential help topic display area (if needed within this window) */
.help-topic-view {
    margin-top: 30px;
    padding: 20px;
    background-color: #fff;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
    display: none; /* Hidden by default, shown when a topic is clicked */
}
.help-topic-view h4 {
    color: #e95420;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
}
.help-topic-view p {
    line-height: 1.7;
    color: #555;
    font-size: 15px;
    margin-bottom: 10px;
}
.help-topic-view ul {
    margin-bottom: 10px;
    padding-right: 20px; /* RTL */
}
.help-topic-view li {
    margin-bottom: 5px;
    color: #555;
}