/* Hyprland / Arch Theme - Based on Catppuccin Mocha */
:root {
    /* Colors - Catppuccin Mocha */
    --base: #000000;
    /* Darker Black as requested */
    --mantle: #0f0f0f;
    --crust: #050505;

    --text: #cdd6f4;
    --subtext0: #a6adc8;
    --subtext1: #bac2de;

    --surface0: #1e1e2e;
    --surface1: #313244;
    --surface2: #45475a;

    --overlay0: #6c7086;

    --blue: #89b4fa;
    --lavender: #b4befe;
    --sapphire: #74c7ec;
    --sky: #89dceb;
    --teal: #94e2d5;
    --green: #a6e3a1;
    --yellow: #f9e2af;
    --peach: #fab387;
    --maroon: #eba0ac;
    --red: #f38ba8;
    --mauve: #cba6f7;
    --pink: #f5c2e7;
    --flamingo: #f2cdcd;
    --rosewater: #f5e0dc;

    /* Theme Config */
    --bg-color: var(--base);
    --primary-color: var(--mauve);
    --secondary-color: var(--blue);
    --border-active: var(--primary-color);
    --border-inactive: var(--surface1);

    /* Dimensions */
    --gaps-in: 5px;
    --gaps-out: 10px;
    --border-radius: 8px;
    --border-width: 2px;
    --waybar-height: 38px;

    /* Fonts */
    --font-mono: 'JetBrains Mono', monospace;
    --font-sans: 'Inter', sans-serif;
}

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

body {
    background-color: var(--base);
    color: var(--text);
    font-family: var(--font-sans);
    height: 100vh;
    overflow: hidden;
    user-select: none;
}

/* Boot Screen */
.boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    padding: 2rem;
    font-family: var(--font-mono);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

.boot-screen.hidden {
    display: none;
}

.arch-logo {
    color: var(--blue);
    font-size: 0.8rem;
    line-height: 1.2;
    margin-bottom: 2rem;
    align-self: flex-start;
}

.boot-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--subtext0);
}

.boot-line {
    margin-bottom: 0.2rem;
}

.boot-line span.ok {
    color: var(--green);
    font-weight: bold;
}

/* Desktop */
.desktop {
    position: relative;
    width: 100%;
    height: 100%;
    background-image: url('../assets/images/wall.png');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
}

.wallpaper {
    position: absolute;
    inset: 0;
    background: var(--base);
    opacity: 0.7;
    /* Darker wallpaper tint */
    z-index: 0;
    pointer-events: none;
}

/* Waybar */
.waybar {
    height: var(--waybar-height);
    width: calc(100% - (var(--gaps-out) * 2));
    margin: var(--gaps-out) auto 0;
    background: rgba(0, 0, 0, 0.9);
    /* Darker bar */
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    z-index: 100;
    font-family: var(--font-mono);
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.waybar-module {
    padding: 4px 12px;
    background: var(--surface0);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 4px;
    transition: all 0.2s ease;
}

.waybar-module:hover {
    background: var(--surface1);
}

.waybar-right {
    display: flex;
    align-items: center;
}

/* Workspaces */
.workspaces {
    display: flex;
    gap: 6px;
    padding: 4px;
    background: transparent;
}

.workspace-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--surface2);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.workspace-dot.active {
    width: 24px;
    border-radius: 12px;
    background: var(--primary-color);
}

.workspace-dot:hover {
    background: var(--overlay0);
}

/* Window Title */
.window-title {
    background: transparent;
    font-weight: 600;
    color: var(--subtext1);
}

/* Main Container */
.workspaces-container {
    flex: 1;
    margin: var(--gaps-in) var(--gaps-out) var(--gaps-out);
    position: relative;
    z-index: 10;
}

/* Windows */
.window {
    position: absolute;
    background: #000000;
    /* Pure black bg */
    border: var(--border-width) solid var(--border-inactive);
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition:
        border-color 0.2s ease,
        transform 0.2s cubic-bezier(0.25, 1, 0.5, 1),
        opacity 0.2s ease,
        width 0.3s ease,
        height 0.3s ease,
        top 0.3s ease,
        left 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.window.focused {
    border-color: var(--border-active);
    z-index: 50;
    box-shadow: 0 0 20px rgba(203, 166, 247, 0.1);
}

/* Window Decoration (Titlebar) */
.window-decoration {
    background: #0a0a0a;
    /* Very dark titlebar */
    padding: 6px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--surface0);
    user-select: none;
    height: 32px;
}

.window.focused .window-decoration {
    background: #0f0f0f;
}

.window-title-box {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--subtext1);
}

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

.control-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: transform 0.1s;
}

.control-btn:hover {
    transform: scale(1.1);
}

.control-btn.close {
    background: var(--red);
}

.control-btn.minimize {
    background: var(--yellow);
}

.control-btn.maximize {
    background: var(--green);
}

/* App Content Area */
.window-content {
    flex: 1;
    overflow: hidden;
    background: #000000;
    /* Ensure content is black */
    position: relative;
}

/* Terminal Styling */
.terminal-window {
    font-family: var(--font-mono);
    padding: 15px;
    color: var(--text);
    height: 100%;
    overflow-y: auto;
    font-size: 13px;
    background: #000000;
    /* Pure black terminal */
}

/* Terminal Input */
.term-input {
    background: transparent;
    border: none;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: inherit;
    width: 100%;
    outline: none;
    margin-left: 8px;
    caret-color: var(--text);
}

.input-line {
    display: flex;
    align-items: center;
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: border-color 0.2s;
}

.input-line:focus-within {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.05);
}

.prompt {
    color: var(--green);
}

.path {
    color: var(--blue);
}

/* File Manager */
.file-manager {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #050505;
}

.fm-toolbar {
    padding: 8px;
    border-bottom: 1px solid var(--surface0);
    display: flex;
    gap: 10px;
    align-items: center;
    background: #0a0a0a;
}

.fm-path {
    background: var(--surface0);
    padding: 4px 10px;
    border-radius: 4px;
    flex: 1;
    font-size: 12px;
    color: var(--subtext1);
}

.fm-grid {
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 15px;
    overflow-y: auto;
}

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

.fm-item:hover {
    background: var(--surface0);
}

.fm-icon {
    width: 32px;
    height: 32px;
    color: var(--blue);
}

.fm-label {
    font-size: 11px;
    text-align: center;
    color: var(--text);
    word-break: break-all;
}

/* Image Viewer */
.image-viewer {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.image-viewer img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Rofi Overlay */
.rofi-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.rofi-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.rofi-window {
    width: 600px;
    max-height: 500px;
    background: #050505;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.rofi-input-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface0);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid transparent;
}

.rofi-input-box:focus-within {
    border-color: var(--secondary-color);
}

.rofi-input-box input {
    background: transparent;
    border: none;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 1.2rem;
    width: 100%;
    outline: none;
}

.rofi-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow-y: auto;
    max-height: 400px;
    padding-right: 5px;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--surface1);
    border-radius: 3px;
}

.rofi-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    transition: all 0.1s ease;
}

.rofi-item.selected,
.rofi-item:hover {
    background: var(--surface1);
}

.rofi-item .icon {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
}

/* Dynamic Island */
.dynamic-island {
    position: fixed;
    top: 5px;
    /* Aligns with Waybar */
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    border-radius: 20px;
    height: 30px;
    width: 100px;
    z-index: 2000;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    pointer-events: none;
}

.dynamic-island.visible {
    opacity: 1;
    pointer-events: auto;
}

.dynamic-island.expanded {
    width: 350px;
    height: 140px;
    border-radius: 25px;
    padding: 15px;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    top: 10px;
}

.island-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    opacity: 0;
    transition: opacity 0.2s 0.1s;
}

.dynamic-island.expanded .island-content {
    opacity: 1;
}

.island-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.album-art {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
}

.track-info {
    display: flex;
    flex-direction: column;
}

.track-title {
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
}

.track-artist {
    color: var(--subtext0);
    font-size: 12px;
}

.island-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.control-icon {
    width: 24px;
    height: 24px;
    color: var(--text);
    cursor: pointer;
    transition: transform 0.1s;
}

.control-icon:hover {
    color: var(--blue);
    transform: scale(1.1);
}

.island-bottom {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.2s 0.2s;
}

.dynamic-island.expanded .island-bottom {
    opacity: 1;
}

.vol-icon {
    width: 18px;
    height: 18px;
    color: var(--subtext0);
}

.volume-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: var(--surface1);
    border-radius: 2px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--blue);
    cursor: pointer;
}