/* ===== Terminal App ===== */
.terminal-app {
    width: 100%;
    height: 100%;
    background: #1e1e1e;
    display: flex;
    flex-direction: column;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.terminal-output {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    color: #f0f0f0;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.terminal-output .terminal-line {
    margin-bottom: 2px;
}

.terminal-output .command-line {
    color: #4ec9b0;
}

.terminal-output .output-line {
    color: #d4d4d4;
}

.terminal-output .error-line {
    color: #f44336;
}

.terminal-output .success-line {
    color: #4caf50;
}

.terminal-output .warning-line {
    color: #ff9800;
}

.terminal-output .info-line {
    color: #2196f3;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: #252526;
    border-top: 1px solid #3d3d3d;
}

.terminal-prompt {
    color: #4ec9b0;
    margin-right: 8px;
    font-weight: bold;
    white-space: nowrap;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #f0f0f0;
    font-family: inherit;
    font-size: inherit;
    outline: none;
}

.terminal-input::placeholder {
    color: #666;
}

/* ===== File Manager App ===== */
.filemanager-app {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #f5f5f5;
}

.filemanager-toolbar {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 10px;
    background: #e8e8e8;
    border-bottom: 1px solid #d0d0d0;
}

.fm-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
}

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

.fm-btn:active {
    background: rgba(0, 0, 0, 0.15);
}

.fm-path-bar {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    background: white;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    height: 32px;
}

.fm-path-bar i {
    color: #ffc107;
}

.fm-path-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 13px;
    outline: none;
}

.filemanager-container {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.filemanager-sidebar {
    width: 180px;
    background: #e0e0e0;
    border-right: 1px solid #d0d0d0;
    overflow-y: auto;
    padding: 10px 0;
}

.fm-sidebar-item {
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s;
    color: #333;
}

.fm-sidebar-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.fm-sidebar-item.active {
    background: #0078d4;
    color: white;
}

.fm-sidebar-item i {
    width: 20px;
    text-align: center;
}

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

.filemanager-content.list-view {
    display: block;
}

.filemanager-content.list-view .fm-item {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    margin-bottom: 2px;
    border-radius: 4px;
}

.filemanager-content.list-view .fm-item-icon {
    margin-right: 10px;
}

.fm-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.fm-item:hover {
    background: rgba(0, 120, 212, 0.1);
}

.fm-item.selected {
    background: rgba(0, 120, 212, 0.2);
    border: 1px solid #0078d4;
}

.fm-item-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

.fm-item-icon.folder {
    color: #ffc107;
}

.fm-item-icon.file {
    color: #666;
}

.fm-item-icon.executable {
    color: #4caf50;
}

.fm-item-icon.image {
    color: #e91e63;
}

.fm-item-icon.document {
    color: #2196f3;
}

.fm-item-icon.music {
    color: #9c27b0;
}

.fm-item-icon.video {
    color: #f44336;
}

.fm-item-icon.archive {
    color: #ff9800;
}

.fm-item-name {
    font-size: 12px;
    text-align: center;
    word-break: break-word;
    color: #333;
    max-width: 90px;
}

.fm-item-size {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

.filemanager-statusbar {
    padding: 5px 15px;
    background: #e8e8e8;
    border-top: 1px solid #d0d0d0;
    font-size: 12px;
    color: #666;
}

/* ===== Calculator App ===== */
.calculator-app {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #1e1e1e;
    padding: 10px;
    box-sizing: border-box;
    overflow: hidden;
}

.calc-display {
    background: #252526;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.calc-history {
    font-size: 14px;
    color: #888;
    text-align: right;
    min-height: 20px;
    margin-bottom: 5px;
}

.calc-input {
    font-size: 36px;
    color: #f0f0f0;
    text-align: right;
    font-family: 'Consolas', monospace;
    overflow-x: auto;
    white-space: nowrap;
}

.calc-main-container {
    display: flex;
    gap: 8px;
    flex: 1;
    overflow: hidden;
}

.calc-standard {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.calc-row {
    display: flex;
    gap: 6px;
    flex: 1;
}

.calc-btn {
    flex: 1;
    height: 100%;
    min-height: 45px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
    background: #3d3d3d;
    color: #f0f0f0;
}

.calc-btn:hover {
    background: #4d4d4d;
}

.calc-btn:active {
    transform: scale(0.95);
}

.calc-btn.operator {
    background: #0078d4;
}

.calc-btn.operator:hover {
    background: #1084d8;
}

.calc-btn.func {
    background: #2d2d2d;
    color: #0078d4;
}

.calc-btn.func:hover {
    background: #3d3d3d;
}

.calc-btn.equals {
    background: #4caf50;
}

.calc-btn.equals:hover {
    background: #45a049;
}

.calc-scientific {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 90px;
    flex-shrink: 0;
    padding-left: 8px;
    border-left: 1px solid #3d3d3d;
}

.calc-scientific.hidden {
    display: none;
}

.calc-sci-row {
    display: flex;
    gap: 6px;
    flex: 1;
}

.sci-btn {
    min-height: 45px;
    font-size: 14px;
    padding: 0;
}

.calc-mode-toggle {
    margin-top: 8px;
    text-align: center;
    flex-shrink: 0;
}

.calc-mode-toggle button {
    background: transparent;
    border: 1px solid #0078d4;
    color: #0078d4;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
}

.calc-mode-toggle button:hover {
    background: rgba(0, 120, 212, 0.1);
}

/* ===== Browser App ===== */
.browser-app {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #f0f0f0;
}

.browser-toolbar {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 10px;
    background: #f8f8f8;
    border-bottom: 1px solid #d0d0d0;
}

.browser-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
}

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

.browser-url-bar {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    background: white;
    border: 1px solid #d0d0d0;
    border-radius: 20px;
    height: 36px;
}

.browser-url-bar i {
    color: #4caf50;
    font-size: 12px;
}

.browser-url-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 13px;
    outline: none;
}

.browser-url-bar button {
    width: 28px;
    height: 28px;
    border: none;
    background: #0078d4;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.browser-url-bar button:hover {
    background: #1084d8;
}

.browser-content {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.browser-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

.browser-homepage {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    overflow-y: auto;
}

.browser-homepage-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
    text-align: center;
}

.browser-homepage-content h1 {
    font-size: 48px;
    color: #333;
    margin-bottom: 40px;
    font-weight: 300;
}

.browser-search-box {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    background: #f5f5f5;
    border-radius: 30px;
    margin-bottom: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.browser-search-box i {
    font-size: 20px;
    color: #888;
}

.browser-search-box input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 16px;
    outline: none;
}

.browser-bookmarks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.browser-bookmark {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.browser-bookmark:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.bookmark-icon {
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f5f5f5;
    border-radius: 50%;
    font-size: 24px;
    color: #333;
}

.browser-bookmark span {
    font-size: 13px;
    color: #666;
}

.browser-statusbar {
    padding: 5px 15px;
    background: #f8f8f8;
    border-top: 1px solid #d0d0d0;
    font-size: 12px;
    color: #666;
}

/* ===== Notepad App ===== */
.notepad-app {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #1e1e1e;
}

.notepad-toolbar {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 10px;
    background: #252526;
    border-bottom: 1px solid #3d3d3d;
    flex-wrap: wrap;
}

.np-btn {
    padding: 6px 12px;
    border: none;
    background: transparent;
    color: #f0f0f0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
}

.np-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.np-btn i {
    font-size: 14px;
}

.np-separator {
    width: 1px;
    height: 24px;
    background: #3d3d3d;
    margin: 0 5px;
}

.np-font-size {
    padding: 4px 8px;
    background: #3d3d3d;
    border: none;
    color: #f0f0f0;
    border-radius: 4px;
    outline: none;
}

.np-color {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 2px;
}

.notepad-content {
    flex: 1;
    overflow: hidden;
}

.notepad-textarea {
    width: 100%;
    height: 100%;
    background: #1e1e1e;
    color: #f0f0f0;
    border: none;
    padding: 15px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: none;
    outline: none;
}

.notepad-textarea::placeholder {
    color: #666;
}

.notepad-statusbar {
    padding: 5px 15px;
    background: #252526;
    border-top: 1px solid #3d3d3d;
    font-size: 12px;
    color: #888;
}

/* ===== Settings App ===== */
.settings-app {
    width: 100%;
    height: 100%;
    display: flex;
    background: #f5f5f5;
}

.settings-sidebar {
    width: 220px;
    background: #e8e8e8;
    border-right: 1px solid #d0d0d0;
    padding: 15px 0;
}

.settings-nav-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: #333;
}

.settings-nav-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.settings-nav-item.active {
    background: #0078d4;
    color: white;
}

.settings-nav-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.settings-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.settings-section {
    margin-bottom: 30px;
}

.settings-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.settings-group {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.settings-group h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

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

.settings-item label {
    font-size: 14px;
    color: #555;
}

.settings-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 200px;
    outline: none;
}

.settings-input:focus {
    border-color: #0078d4;
}

.settings-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    outline: none;
}

.settings-toggle {
    position: relative;
    width: 50px;
    height: 26px;
    background: #ccc;
    border-radius: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.settings-toggle.active {
    background: #0078d4;
}

.settings-toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s;
}

.settings-toggle.active::after {
    left: 27px;
}

.settings-color-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.settings-color-item {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.settings-color-item:hover {
    transform: scale(1.1);
}

.settings-color-item.active {
    border-color: #333;
}

.about-logo {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.about-logo i {
    font-size: 64px;
    color: #0078d4;
}

.about-logo h1 {
    font-size: 32px;
    color: #333;
}

.about-version {
    color: #666;
    font-size: 14px;
}

.about-info {
    margin-top: 20px;
}

.about-info p {
    color: #555;
    margin-bottom: 10px;
    font-size: 14px;
}

/* ===== File Context Menu ===== */
.file-context-menu {
    position: fixed;
    background: #2d2d2d;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    min-width: 180px;
    padding: 5px 0;
    z-index: 2000;
}

.file-context-menu-item {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s;
    color: #f0f0f0;
    font-size: 13px;
}

.file-context-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.file-context-menu-item i {
    width: 16px;
    text-align: center;
    color: #0078d4;
}

.file-context-menu-item.danger {
    color: #f44336;
}

.file-context-menu-item.danger i {
    color: #f44336;
}

/* ===== Dialog Modal ===== */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

.dialog-modal {
    background: #2d2d2d;
    border-radius: 8px;
    padding: 20px;
    min-width: 300px;
    max-width: 500px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.dialog-header h3 {
    color: #f0f0f0;
    font-size: 16px;
}

.dialog-close {
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 18px;
}

.dialog-close:hover {
    color: #f0f0f0;
}

.dialog-body {
    margin-bottom: 20px;
}

.dialog-body p {
    color: #ccc;
    font-size: 14px;
}

.dialog-body input {
    width: 100%;
    padding: 10px;
    background: #1e1e1e;
    border: 1px solid #3d3d3d;
    border-radius: 4px;
    color: #f0f0f0;
    font-size: 14px;
    margin-top: 10px;
}

.dialog-body input:focus {
    outline: none;
    border-color: #0078d4;
}

.dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.dialog-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.dialog-btn.primary {
    background: #0078d4;
    color: white;
}

.dialog-btn.primary:hover {
    background: #1084d8;
}

.dialog-btn.secondary {
    background: #3d3d3d;
    color: #f0f0f0;
}

.dialog-btn.secondary:hover {
    background: #4d4d4d;
}

/* ===== Notification ===== */
.notification {
    position: fixed;
    bottom: 70px;
    right: 20px;
    background: #2d2d2d;
    border-radius: 8px;
    padding: 15px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 3000;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

.notification i {
    font-size: 24px;
}

.notification.success i {
    color: #4caf50;
}

.notification.error i {
    color: #f44336;
}

.notification.warning i {
    color: #ff9800;
}

.notification.info i {
    color: #2196f3;
}

.notification-content h4 {
    color: #f0f0f0;
    font-size: 14px;
    margin-bottom: 3px;
}

.notification-content p {
    color: #888;
    font-size: 12px;
}

/* ===== Dialog File Browser ===== */
.dialog-file-item {
    padding: 8px 10px;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.dialog-file-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dialog-path-input {
    flex: 1;
    padding: 8px;
    background: #1e1e1e;
    border: 1px solid #3d3d3d;
    border-radius: 4px;
    color: #f0f0f0;
    font-size: 14px;
}

.dialog-path-input:focus {
    outline: none;
    border-color: #0078d4;
}

/* ===== Browser Blocked Page ===== */
.browser-blocked-page {
    max-width: 600px;
    margin: 80px auto;
    text-align: center;
    padding: 40px 20px;
}

.browser-blocked-page .blocked-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff3e0;
    border-radius: 50%;
}

.browser-blocked-page .blocked-icon i {
    font-size: 40px;
    color: #ff9800;
}

.browser-blocked-page h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.browser-blocked-page .blocked-host {
    font-size: 16px;
    color: #0078d4;
    margin-bottom: 15px;
}

.browser-blocked-page .blocked-reason {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
}

.browser-blocked-page .blocked-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.browser-blocked-page .blocked-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.browser-blocked-page .blocked-btn.primary {
    background: #0078d4;
    color: white;
}

.browser-blocked-page .blocked-btn.primary:hover {
    background: #1084d8;
}

.browser-blocked-page .blocked-btn.secondary {
    background: #f0f0f0;
    color: #333;
}

.browser-blocked-page .blocked-btn.secondary:hover {
    background: #e0e0e0;
}

.browser-blocked-page .blocked-info {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 20px;
    text-align: left;
}

.browser-blocked-page .blocked-info p {
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
    line-height: 1.5;
}

.browser-blocked-page .blocked-info p:last-child {
    margin-bottom: 0;
}

.browser-notice {
    max-width: 600px;
    margin: 40px auto 0;
    padding: 15px 20px;
    background: #fff3e0;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
}

.browser-notice i {
    color: #ff9800;
    font-size: 20px;
    margin-top: 2px;
}

.browser-notice p {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.bookmark-icon.youtube {
    background: #ffebee;
    color: #f44336;
}
