:root {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-card: #2d2d2d;
    --bg-card-hover: #3d3d3d;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --text-muted: #888888;
    --heading-color: #e0e0e0;
    --border-color: #404040;
    --shadow: rgba(0, 0, 0, 0.3);
    --item-bg: #252525;
    --item-hover-bg: #333333;
    --nested-bg: #242424;
    --accent-purple: #7c4dff;
    --accent-purple-hover: #651fff;
}

body.light-theme, [data-theme="light"] {
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f0f0;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --heading-color: #2c3e50;
    --border-color: #dddddd;
    --shadow: rgba(0, 0, 0, 0.1);
    --item-bg: #f9f9f9;
    --item-hover-bg: #f0f0f0;
    --nested-bg: #fafafa;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

header h1 {
    font-size: 2em;
    color: var(--text-primary);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.slider-upload-btn {
    position: relative;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
    width: 44px; 
    height: 44px;
    padding: 6px;
}

.slider-upload-btn svg {
    width: 24px;
    height: 24px;
}

.slider-upload-btn:hover {
    background-color: rgba(124, 77, 255, 0.15);
    color: var(--accent-purple);
}

.theme-toggle {
    position: relative;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.toggle-track {
    position: relative;
    display: block;
    width: 64px;
    height: 32px;
    border-radius: 16px;
    box-sizing: border-box;
    border: 2px solid var(--border-color);
    background: linear-gradient(to right, #1a1a2e, #16213e);
    transition: background 0.4s ease, border-color 0.4s ease;
}

body.light-theme .toggle-track, .theme-toggle.light .toggle-track {
    background: linear-gradient(to right, #87ceeb, #a1d6f2);
}

.toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    transform: translateX(0);
    transition: transform 0.4s cubic-bezier(0.68, -0.4, 0.32, 1.4);
}

body.light-theme .toggle-thumb, .theme-toggle.light .toggle-thumb {
    transform: translateX(32px);
}

.celestial-body {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #cfd8e3;
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

body.light-theme .celestial-body, .theme-toggle.light .celestial-body {
    background: #ffd54f;
    box-shadow: 0 0 10px 2px rgba(255, 213, 79, 0.7);
}

.crater {
    position: absolute;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.15);
    transition: opacity 0.3s ease;
}

.crater1 { width: 5px; height: 5px; top: 4px; left: 8px; }
.crater2 { width: 3px; height: 3px; top: 13px; left: 5px; }
.crater3 { width: 4px; height: 4px; top: 15px; left: 13px; }

body.light-theme .crater, .theme-toggle.light .crater { opacity: 0; }

.ray {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 6px;
    margin: -3px 0 0 -1px;
    border-radius: 1px;
    background: #ffd54f;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.ray1 { transform: rotate(0deg) translateY(-14px); }
.ray2 { transform: rotate(45deg) translateY(-14px); }
.ray3 { transform: rotate(90deg) translateY(-14px); }
.ray4 { transform: rotate(135deg) translateY(-14px); }
.ray5 { transform: rotate(180deg) translateY(-14px); }
.ray6 { transform: rotate(225deg) translateY(-14px); }
.ray7 { transform: rotate(270deg) translateY(-14px); }
.ray8 { transform: rotate(315deg) translateY(-14px); }

body.light-theme .ray, .theme-toggle.light .ray { opacity: 1; }

.search-section { margin-bottom: 25px; }
.search-wrapper { position: relative; }
.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 16px 20px 16px 54px;
    font-size: 1.1em;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 4px rgba(124, 77, 255, 0.15);
}

.files-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px var(--shadow);
}

.files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
    flex-wrap: wrap;
    gap: 15px;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.files-header h2 {
    font-size: 1.5em;
    color: var(--heading-color);
}

.select-all-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    color: var(--text-secondary);
    user-select: none;
    padding: 8px 14px;
    border-radius: 8px;
    background: var(--item-bg);
    border: 1px solid var(--border-color);
    transition: background-color 0.2s, border-color 0.2s;
}

.select-all-container:hover {
    background-color: var(--item-hover-bg);
    border-color: var(--accent-purple);
}

.file-checkbox, #selectAllCheckbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent-purple);
    border-radius: 4px;
}

.view-toggle {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.view-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.view-btn:hover {
    background: var(--item-hover-bg);
    color: var(--text-primary);
}

.view-btn.active {
    background: var(--accent-purple);
    color: white;
}

.bulk-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(124, 77, 255, 0.12);
    border: 1px solid rgba(124, 77, 255, 0.3);
    border-radius: 10px;
    padding: 12px 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.selected-count {
    font-weight: 600;
    color: var(--accent-purple);
    font-size: 0.95em;
}

.bulk-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.bulk-buttons .btn {
    border-radius: 8px;
    padding: 8px 14px;
    font-weight: 500;
}

.file-count {
    background: rgba(124, 77, 255, 0.15);
    color: var(--accent-purple);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    white-space: nowrap;
}

.files-list { display: grid; gap: 15px; }
.files-list, .files-list.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.file-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px;
    background: var(--item-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, background 0.2s ease;
    min-height: 200px;
}

.file-card:hover {
    background: var(--item-hover-bg);
    transform: translateY(-2px);
}

.file-card-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    position: relative;
    width: 100%;
}

.file-card-left .file-checkbox {
    position: absolute;
    top: 0;
    left: 0;
}

.file-icon { font-size: 2.8em; margin: 8px 0; }
.file-details { width: 100%; }
.file-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95em;
    margin-bottom: 4px;
}
.file-meta { font-size: 0.8em; color: var(--text-muted); }

.file-actions {
    display: flex;
    flex-direction: row;
    gap: 8px;
    width: 100%;
    margin-top: 14px;
}

.file-actions .btn, .bulk-buttons .btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    font-size: 0.85em;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
    white-space: nowrap;
}

.btn-download { background: #4CAF50; color: white; }
.btn-download:hover { background: #45a049; }
.btn-online { background: #2196F3; color: white; }
.btn-online:hover { background: #0b7dda; }
.btn-delete { background: #f44336; color: white; }
.btn-delete:hover { background: #da190b; }

.files-list.list-view { grid-template-columns: 1fr; }
.files-list.list-view .file-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: auto;
    padding: 12px 16px;
}
.files-list.list-view .file-card-left {
    flex-direction: row;
    align-items: center;
    text-align: left;
    width: auto;
    gap: 12px;
}
.files-list.list-view .file-card-left .file-checkbox { position: static; }
.files-list.list-view .file-icon { font-size: 1.8em; margin: 0; }
.files-list.list-view .file-actions { width: auto; margin-top: 0; flex-shrink: 0; }
.files-list.list-view .file-actions .btn { flex: initial; padding: 6px 14px; }

.drop-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(101, 31, 255, 0.88);
    backdrop-filter: blur(6px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.drop-overlay.active { opacity: 1; visibility: visible; }
.drop-overlay-content {
    color: #ffffff;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    pointer-events: none;
}

/* Settings Squircle Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.active { opacity: 1; visibility: visible; }

.modal-container {
    display: flex;
    width: 620px;
    height: 420px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 12px 32px var(--shadow);
    overflow: hidden;
    position: relative;
}

.modal-sidebar {
    width: 180px;
    background: var(--item-bg);
    border-right: 1px solid var(--border-color);
    padding: 20px 0;
}

.modal-sidebar h3 {
    padding: 0 20px 12px 20px;
    font-size: 1.1em;
    color: var(--text-primary);
}

.sidebar-item {
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-secondary);
    list-style: none;
    transition: background 0.2s, color 0.2s;
}

.sidebar-item.active, .sidebar-item:hover {
    background: rgba(124, 77, 255, 0.12);
    color: var(--accent-purple);
    border-left: 3px solid var(--accent-purple);
}

.modal-content {
    flex: 1;
    padding: 24px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 1.6em;
    color: var(--text-secondary);
    cursor: pointer;
}

.modal-close:hover { color: var(--text-primary); }

.modal-body h2 {
    font-size: 1.4em;
    margin-bottom: 4px;
}

.settings-desc {
    font-size: 0.85em;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-group label {
    font-size: 0.95em;
    font-weight: 600;
}

.color-picker-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

#accentColorPicker {
    -webkit-appearance: none;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
}

#accentColorPicker::-webkit-color-swatch-wrapper { padding: 0; }
#accentColorPicker::-webkit-color-swatch {
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

#accentHexInput {
    width: 100px;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9em;
    text-transform: uppercase;
}

#accentHexInput:focus {
    outline: none;
    border-color: var(--accent-purple);
}

.btn-reset {
    background: var(--item-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background 0.2s;
}

.btn-reset:hover {
    background: var(--item-hover-bg);
    border-color: var(--accent-purple);
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    background: var(--accent-purple);
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateX(400px);
    transition: transform 0.3s;
    z-index: 1000;
}
.your-element-class {
  position: fixed; /* Keeps it fixed relative to the screen */
  top: 16px;       /* Distance from the top edge */
  left: 16px;      /* Distance from the left edge */
  
  width: 120px;    /* Adjust size as needed */
  height: auto;
  
  opacity: 0.5;    /* Translucency (0.0 is invisible, 1.0 is fully opaque) */
  z-index: 9999;  /* Keeps it above other page elements */
  
  /* Optional: Smooth transition when hovered */
  transition: opacity 0.2s ease-in-out;
}

.your-element-class:hover {
  opacity: 0.9;    /* Slightly less translucent on hover so it's readable */
}
.notification.show { transform: translateX(0); }
.notification.error { background: #f44336; }
