/* macOS Ventura Inspired Theme - Premium & Modern */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Ventura Palette */
    --accent-color: #007AFF;
    --accent-hover: #0063CC;
    --window-bg: rgba(28, 28, 28, 0.75);
    --sidebar-bg: rgba(45, 45, 45, 0.4);
    --content-bg: rgba(35, 35, 35, 0.6);
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.55);
    --border-color: rgba(255, 255, 255, 0.1);
    --item-hover: rgba(255, 255, 255, 0.08);
    --item-selected: rgba(255, 255, 255, 0.12);
    --pill-gradient: linear-gradient(180deg, #007AFF 0%, #0061E0 100%);
    --shadow-premium: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    margin: 0;
    height: 100vh;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: #000;
    color: var(--text-primary);
}

/* Custom Mac-style Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    border: 1px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
    background-clip: content-box;
}

/* Authentic Landscape Wallpaper */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1501785888041-af3ef285b470?q=80&w=2070&auto=format&fit=crop') no-repeat center center/cover;
    z-index: -2;
}

body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    z-index: -1;
}

.window-container {
    width: 940px;
    height: 640px;
    background: var(--window-bg);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-radius: 12px;
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    box-shadow: var(--shadow-premium);
    display: flex;
    overflow: hidden;
    animation: windowAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center bottom;
    /* Professional smooth transitions for resizing and spring for movement */
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        height 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.6s cubic-bezier(0.17, 0.67, 0.43, 1.3),
        opacity 0.4s ease-out,
        filter 0.4s ease-in-out,
        margin 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        border-radius 0.6s ease;
}

.window-container.maximized {
    width: calc(100vw - 40px) !important;
    height: calc(100vh - 60px) !important;
    margin-top: 20px;
    border-radius: 10px;
}

.window-container.minimized {
    opacity: 0;
    transform: scale(0.3) translateY(400px);
    filter: blur(40px) brightness(1.2);
    /* Motion blur during move */
    pointer-events: none;
}

/* macOS Dock */
.dock-container {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(45, 45, 45, 0.4);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px);
    padding: 8px;
    border-radius: 20px;
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 10px;
    transition: bottom 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 9000;
}

.dock-container.active {
    bottom: 20px;
}

.dock-item {
    width: 48px;
    height: 48px;
    background: var(--pill-gradient);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: white;
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
}

.dock-item:hover {
    transform: scale(1.2) translateY(-10px);
}

.dock-item::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
}

@keyframes windowAppear {
    from {
        opacity: 0;
        transform: scale(0.94) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Sidebar - Ventura Style */
.sidebar {
    width: 220px;
    background: var(--sidebar-bg);
    border-right: 0.5px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    padding: 32px 12px;
    flex-shrink: 0;
}

.traffic-lights {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding-left: 12px;
}

.light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    /* Make all lights selectable */
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.light:hover {
    transform: scale(1.15);
}

.red {
    background: #FF5F56;
    border: 0.5px solid rgba(0, 0, 0, 0.1);
}

.yellow {
    background: #FFBD2E;
    border: 0.5px solid rgba(0, 0, 0, 0.1);
}

.green {
    background: #27C93F;
    border: 0.5px solid rgba(0, 0, 0, 0.1);
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-item i {
    font-size: 14px;
    width: 18px;
    text-align: center;
    opacity: 0.9;
}

.menu-item:hover:not(.active) {
    background: var(--item-hover);
}

.menu-item.active {
    background: var(--pill-gradient);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.menu-item.active i {
    color: white;
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--content-bg);
    overflow: hidden;
    /* Ensure content doesn't push footer out */
}

.toolbar {
    height: 54px;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.1);
}

.title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.search-bar {
    position: relative;
}

.search-bar i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 12px;
}

.search-bar input {
    background: rgba(0, 0, 0, 0.25);
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 6px 12px 6px 30px;
    color: white;
    font-size: 12px;
    width: 200px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-bar input:focus {
    width: 240px;
    background: rgba(0, 0, 0, 0.4);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.25);
    outline: none;
}

/* List Headers */
.list-header {
    display: grid;
    grid-template-columns: 44px 1fr 140px 100px;
    padding: 12px;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.1);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    background: rgba(255, 255, 255, 0.02);
}

.list-container {
    flex: 1;
    overflow-y: overlay;
    padding: 4px 12px;
}

.list-row {
    display: grid;
    grid-template-columns: 44px 1fr 140px 100px;
    padding: 10px 12px;
    align-items: center;
    border-radius: 8px;
    margin-bottom: 2px;
    font-size: 13px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    animation: listItemSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

@keyframes listItemSlide {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.list-row:hover {
    background: var(--item-hover);
}

.list-row.selected {
    background: var(--item-selected);
}

.col-os {
    color: var(--text-secondary);
    font-size: 12px;
}

.col-size {
    text-align: right;
    color: var(--text-secondary);
}

/* Action Bar */
.action-bar {
    padding: 16px 24px;
    border-top: 0.5px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.15);
}

.status-text {
    font-size: 12px;
    color: var(--text-secondary);
}

.btn-primary {
    background: var(--pill-gradient);
    color: white;
    border: none;
    padding: 6px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.btn-primary:active {
    transform: scale(0.97);
}

/* Modals - Authentic macOS Look */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.download-window {
    width: 650px;
    background: #1E1E1E;
    border-radius: 12px;
    border: 0.5px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalPopUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPopUp {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.modal-body {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.download-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 0.5px solid rgba(255, 255, 255, 0.08);
    gap: 15px;
}

.d-name {
    font-size: 13px;
    font-weight: 500;
}

.modal-footer {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border-top: 0.5px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 5px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Elegant Horizontal Slider View for Presets */
.preset-slider-container {
    flex: 1;
    min-height: 0;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    background: rgba(0, 0, 0, 0.2);
    overflow: hidden;
    user-select: none;
}

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.08);
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
    backdrop-filter: blur(10px);
}

.nav-arrow:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-50%) scale(1.1);
}

.nav-arrow.left {
    left: 20px;
}

.nav-arrow.right {
    right: 20px;
}

.nav-arrow.disabled {
    opacity: 0;
    pointer-events: none;
}

.slider-content {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 80px;
    perspective: 1200px;
}

.preset-card-large {
    width: 100%;
    max-width: 860px;
    height: 100%;
    max-height: 480px;
    background: rgba(45, 45, 45, 0.4);
    backdrop-filter: blur(40px) saturate(150%);
    -webkit-backdrop-filter: blur(40px);
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    display: flex;
    overflow: hidden;
    position: relative;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.5);
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    animation: sliderIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.check-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.preset-card-large.selected .check-indicator {
    opacity: 1;
    transform: scale(1);
}

@keyframes sliderIn {
    0% {
        opacity: 0;
        transform: scale(0.96) translateX(40px);
        filter: blur(10px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateX(0);
        filter: blur(0);
    }
}

.card-half-media {
    width: 50%;
    height: 100%;
    background: #000;
    position: relative;
    overflow: hidden;
    border-right: 0.5px solid rgba(255, 255, 255, 0.1);
}

.card-half-media img,
.card-half-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s ease;
}

.preset-card-large:hover .card-half-media img,
.preset-card-large:hover .card-half-media video {
    transform: scale(1.05);
}

.card-half-info {
    width: 50%;
    height: 100%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
}

.card-title-large {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.info-grid-large {
    display: grid;
    gap: 15px;
}

.info-row-large {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
}

.info-row-large .label {
    color: var(--text-secondary);
}

.info-row-large .value {
    font-weight: 600;
    color: #fff;
}

.selection-overlay {
    position: absolute;
    inset: 0;
    border: 3px solid var(--accent-primary);
    border-radius: 24px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.preset-card-large.selected .selection-overlay {
    opacity: 1;
}

.preset-card-large.selected {
    background: rgba(0, 122, 255, 0.1);
}

/* Grid View for Presets */
.preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.grid-card {
    background: rgba(255, 255, 255, 0.05);
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    position: relative;
}

.grid-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.grid-card.selected {
    border-color: var(--accent-primary);
    background: rgba(0, 122, 255, 0.15);
}

.grid-preview {
    width: 100%;
    aspect-ratio: 1/1;
    background: #000;
    overflow: hidden;
}

.grid-preview img,
.grid-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grid-info {
    padding: 12px;
}

.grid-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.grid-meta {
    font-size: 11px;
    color: var(--text-secondary);
}

.preset-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
}

.preset-card.selected {
    border-color: var(--accent-color);
    background: rgba(0, 122, 255, 0.1);
}

.preview-container {
    height: 100%;
    aspect-ratio: 1/1;
    background: #000;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.preview-container video,
.preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.preset-card:hover .preview-container video,
.preset-card:hover .preview-container img {
    transform: scale(1.05);
}

.card-info {
    padding: 32px 40px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    overflow: hidden;
    justify-content: center;
}

.info-item {
    display: flex;
    font-size: 13px;
    gap: 16px;
    line-height: 1.6;
}

.info-label {
    color: var(--text-secondary);
    width: 100px;
    flex-shrink: 0;
    font-weight: 600;
}

.info-value {
    color: var(--text-primary);
    font-weight: 500;
}

.card-name {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.5px;
}

/* Slider Navigation Arrows */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 20;
    backdrop-filter: blur(10px);
}

.nav-arrow:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 20px rgba(0, 122, 255, 0.4);
}

.nav-arrow.left {
    left: 20px;
}

.nav-arrow.right {
    right: 20px;
}

.nav-arrow.disabled {
    opacity: 0.2;
    cursor: default;
    pointer-events: none;
}

.card-meta {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.format-tag {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-dim);
    text-transform: uppercase;
    font-weight: 700;
}

.selection-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-color);
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.preset-card.selected .selection-indicator {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.preset-card.selected .selection-indicator::after {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 10px;
    color: white;
}

/* Mobile Warning */
.mobile-warning {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #111;
    z-index: 9999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    color: white;
}

.warning-icon {
    font-size: 64px;
    margin-bottom: 24px;
    color: var(--accent-color);
}

@media (max-width: 800px) {
    .mobile-warning {
        display: flex;
    }

    .window-container {
        display: none !important;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}