/* Linux Plasma Desktop Theme */
:root {
    --plasma-blue: #3daee9;
    --plasma-dark-blue: #1d99f3;
    --plasma-light-blue: #93cee9;
    --plasma-accent: #f47750;
    --plasma-bg: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --plasma-panel: rgba(42, 46, 50, 0.95);
    --plasma-window: rgba(239, 240, 241, 0.98);
    --plasma-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --plasma-border: rgba(189, 195, 199, 0.3);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans', 'Oxygen', 'Ubuntu', 'Roboto', sans-serif;
    background: var(--plasma-bg);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Desktop Container */
.plasma-desktop {
    min-height: 100vh;
    position: relative;
    background: var(--plasma-bg);
    background-attachment: fixed;
}

/* Desktop Wallpaper */
.desktop-wallpaper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: cover;
}

.upload-controls {
    display: flex;
    gap: 8px;
    margin-left: 12px;
}

.upload-controls .toolbar-btn {
    background: var(--plasma-blue);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s ease;
}

.upload-controls .toolbar-btn:hover {
    background: var(--plasma-dark-blue);
}


/* Top Panel (Taskbar) */
.plasma-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 44px;
    background: var(--plasma-panel);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--plasma-border);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.panel-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.panel-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.panel-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Application Menu Button */
.app-menu-btn {
    background: none;
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.app-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Desktop Icons Area */
.desktop-area {
    position: absolute;
    top: 44px;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, 80px);
    grid-gap: 20px;
    align-content: start;
    justify-content: start;
}

/* Desktop Icons */
.desktop-icon {
    width: 80px;
    text-align: center;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    user-select: none;
}

.desktop-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.desktop-icon .icon {
    font-size: 48px;
    margin-bottom: 8px;
    display: block;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

.desktop-icon .label {
    color: white;
    font-size: 12px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    word-wrap: break-word;
}

/* File Manager Window */
.file-manager-window {
    position: fixed;
    top: 80px;
    left: 100px;
    width: 900px;
    height: 600px;
    background: var(--plasma-window);
    border-radius: 12px;
    box-shadow: var(--plasma-shadow);
    border: 1px solid var(--plasma-border);
    display: none;
    flex-direction: column;
    z-index: 100;
    backdrop-filter: blur(20px);
}

.file-manager-window.active {
    display: flex;
}

/* Window Title Bar */
.window-title-bar {
    height: 40px;
    background: linear-gradient(135deg, var(--plasma-blue) 0%, var(--plasma-dark-blue) 100%);
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    padding: 0 16px;
    color: white;
    user-select: none;
}

.window-title {
    flex: 1;
    font-weight: 600;
    font-size: 14px;
}

.window-controls {
    display: flex;
    gap: 8px;
}

.window-control {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.window-control:hover {
    opacity: 0.8;
}

.control-minimize { background: #f1c40f; }
.control-maximize { background: #27ae60; }
.control-close { background: #e74c3c; }

/* Toolbar */
.file-manager-toolbar {
    height: 100px;
    background: rgba(189, 195, 199, 0.1);
    border-bottom: 1px solid var(--plasma-border);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
}

.toolbar-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--plasma-border);
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 6px;
}

.toolbar-btn:hover {
    background: var(--plasma-light-blue);
    color: white;
}

.toolbar-btn.active {
    background: var(--plasma-blue);
    color: white;
}

/* Address Bar */
.address-bar {
    flex: 1;
    background: white;
    border: 1px solid var(--plasma-border);
    border-radius: 6px;
    padding: 8px 12px;
    font-family: monospace;
    font-size: 14px;
    margin: 0 12px;
}

/* File Manager Content */
.file-manager-content {
    flex: 1;
    padding: 16px;
    overflow: auto;
    background: white;
    border-radius: 0 0 12px 12px;
}

/* File Grid */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
}

.file-item {
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    user-select: none;
}

.file-item:hover {
    background: rgba(61, 174, 233, 0.1);
    border-color: var(--plasma-light-blue);
}

.file-item.selected {
    background: rgba(61, 174, 233, 0.2);
    border-color: var(--plasma-blue);
}

.file-item .file-icon {
    font-size: 48px;
    margin-bottom: 8px;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.2));
}

.file-item .file-name {
    font-size: 12px;
    color: #2c3e50;
    word-wrap: break-word;
    max-width: 100%;
}

/* Recycle Bin */
.recycle-bin {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 80px;
    height: 100px;
    background: rgba(0, 0, 0, 0.1);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.recycle-bin:hover, .recycle-bin.drag-over {
    background: rgba(231, 76, 60, 0.2);
    border-color: #e74c3c;
    transform: scale(1.05);
}

.recycle-bin .icon {
    font-size: 32px;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    margin-bottom: 4px;
}

.recycle-bin .label {
    color: white;
    font-size: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/* Context Menu */
.context-menu {
    position: fixed;
    background: white;
    border: 1px solid var(--plasma-border);
    border-radius: 8px;
    box-shadow: var(--plasma-shadow);
    padding: 8px 0;
    min-width: 180px;
    z-index: 1000;
    display: none;
}

.context-menu-item {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #2c3e50;
    transition: background 0.2s ease;
}

.context-menu-item:hover {
    background: var(--plasma-light-blue);
    color: white;
}

.context-menu-separator {
    height: 1px;
    background: var(--plasma-border);
    margin: 4px 0;
}

/* Search Interface */
.search-interface {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    background: var(--plasma-window);
    border-radius: 12px;
    box-shadow: var(--plasma-shadow);
    border: 1px solid var(--plasma-border);
    display: none;
    z-index: 200;
    backdrop-filter: blur(20px);
}

.search-interface.active {
    display: block;
}

.search-header {
    padding: 20px;
    border-bottom: 1px solid var(--plasma-border);
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--plasma-border);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--plasma-blue);
}

.search-results {
    max-height: 400px;
    overflow-y: auto;
    padding: 12px;
}

.search-result-item {
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-result-item:hover {
    background: rgba(61, 174, 233, 0.1);
}

/* Modal Dialogs */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-backdrop.active {
    display: flex;
}

.modal-dialog {
    background: white;
    border-radius: 12px;
    box-shadow: var(--plasma-shadow);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--plasma-border);
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--plasma-border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--plasma-blue);
    color: white;
}

.btn-primary:hover {
    background: var(--plasma-dark-blue);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.file-manager-window.active {
    animation: fadeIn 0.3s ease-out;
}

.search-interface.active {
    animation: slideUp 0.3s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .file-manager-window {
        top: 44px;
        left: 0;
        right: 0;
        bottom: 0;
        width: auto;
        height: auto;
        border-radius: 0;
    }
    
    .desktop-area {
        grid-template-columns: repeat(auto-fit, 60px);
        grid-gap: 15px;
    }
    
    .desktop-icon {
        width: 60px;
    }
    
    .desktop-icon .icon {
        font-size: 32px;
    }
}

/* Drag and Drop States */
.drag-over {
    background: rgba(61, 174, 233, 0.2) !important;
    border-color: var(--plasma-blue) !important;
}

.dragging {
    opacity: 0.7;
    transform: rotate(5deg);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--plasma-blue);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
