:root {
    /* Light Mode - Mac Style */
    --bg-page: #d0d0d0;
    --bg-window: #f5f5f5;
    --bg-sidebar: #e8e8e8;
    --bg-content: #ffffff;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --border-color: #c0c0c0;
    --shadow: rgba(0, 0, 0, 0.2);
    --sidebar-hover: #d0d0d0;
    --sidebar-active: #c0c0c0;
}

[data-theme="dark"] {
    /* Dark Mode - Mac Style */
    --bg-page: #1a1a1a;
    --bg-window: #2d2d2d;
    --bg-sidebar: #252525;
    --bg-content: #2d2d2d;
    --text-primary: #f5f5f5;
    --text-secondary: #a0a0a0;
    --border-color: #404040;
    --shadow: rgba(0, 0, 0, 0.5);
    --sidebar-hover: #353535;
    --sidebar-active: #404040;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

.page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.theme-btn {
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.theme-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .theme-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.theme-btn.active {
    background: rgba(255, 255, 255, 0.3);
    color: var(--text-primary);
}

[data-theme="dark"] .theme-btn.active {
    background: rgba(255, 255, 255, 0.15);
}

/* Finder Window */
.finder-window {
    width: 97%;
    max-width: 1500px;
    min-height: 800px;
    height: 86vh;
    background: var(--bg-window);
    border-radius: 12px;
    box-shadow: 
        0 20px 60px var(--shadow),
        0 0 0 1px var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10; /* über der Theme-Lasche */
}

/* Window Title Bar */
.window-titlebar {
    height: 40px;
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    user-select: none;
    -webkit-app-region: drag;
}

.window-controls {
    display: flex;
    gap: 8px;
    margin-right: 1rem;
}

.window-control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-app-region: no-drag;
}

.window-control.close {
    background: #ff5f57;
}

.window-control.close:hover {
    background: #ff3b30;
}

.window-control.minimize {
    background: #ffbd2e;
}

.window-control.minimize:hover {
    background: #ff9500;
}

.window-control.maximize {
    background: #28ca42;
}

.window-control.maximize:hover {
    background: #28cd41;
}

.window-title {
    flex: 1;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Window Content */
.window-content {
    display: flex;
    flex: 1;
    min-height: 0;
}

/* Sidebar */
.finder-sidebar {
    width: 220px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 1rem 0;
    overflow-y: auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.sidebar-section {
    margin-bottom: 1.5rem;
}

.sidebar-section:first-child {
    margin-top: 0.5rem;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    border-radius: 6px;
    margin: 0 0.5rem;
}

.sidebar-item i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    color: var(--text-secondary);
}

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

.sidebar-item.active {
    background: var(--sidebar-active);
    font-weight: 500;
}

.sidebar-item.active i {
    color: var(--text-primary);
}

/* Main Content */
.finder-content {
    flex: 1;
    background: var(--bg-content);
    padding: 2rem;
    overflow: hidden;
}

.content-header {
    margin-bottom: 2rem;
}

.finder-page {
    display: none;
    height: 100%;
    overflow-y: auto;
}

.finder-page.active {
    display: block;
}

.content-header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.content-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.content-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    background: var(--bg-window);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.content-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.content-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--text-secondary);
}

.content-item i {
    color: var(--text-secondary);
}

.content-item span {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.company-intro {
    margin-bottom: 2rem;
    max-width: 720px;
}

.company-intro h2 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.company-intro p {
    color: var(--text-secondary);
    font-size: 0.975rem;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.company-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    align-items: flex-start;
}

.company-meta h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.company-meta ul {
    list-style: disc;
    padding-left: 1.25rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.company-meta li + li {
    margin-top: 0.25rem;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0 1rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .sidebar-logo {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.sidebar-logo-mark {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: linear-gradient(145deg, #ffcc66, #ff9966);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1d1d1f;
    font-size: 0.9rem;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

.sidebar-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.sidebar-logo-title {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.sidebar-logo-sub {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.company-meta p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    background: #007aff;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-link i {
    font-size: 0.95rem;
}

.contact-link:hover {
    background: #0063d1;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

/* Portfolio & Magazin */
.portfolio,
.magazin,
.kontakt,
.studio-status {
    margin-top: 2.5rem;
}

.portfolio h2,
.magazin h2,
.kontakt h2,
.studio-status h2 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.portfolio-grid,
.magazin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.portfolio-item,
.magazin-item {
    padding: 1.5rem;
    background: var(--bg-window);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.portfolio-item h3,
.magazin-item h3 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.portfolio-item p,
.magazin-item p,
.kontakt p,
.studio-status p,
.studio-status ul {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.studio-status ul {
    margin-top: 0.5rem;
    padding-left: 1.25rem;
    list-style: disc;
}

/* Theme-Lasche: außerhalb des Finder-Fensters, im grauen Bereich darunter, z-index unter Finder */
.theme-tab {
    position: absolute;
    right: 7.2rem;
    bottom: 7rem;
    transform: translateX(28px); /* eingefahren: nur Griff sichtbar, Rest hinter Finder (angepasst an kleinere Größe) */
    display: flex;
    align-items: center;
    z-index: 1;
    transition: transform 0.3s ease;
}

.theme-tab-handle {
    width: 28px;
    height: 60px;
    border-radius: 0 6px 6px 0;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-left: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    font-size: 0.85rem;
}

[data-theme="dark"] .theme-tab-handle {
    background: rgba(0, 0, 0, 0.55);
}

.theme-tab-content {
    display: flex;
    gap: 0.3rem;
    align-items: center;
    padding: 0.4rem 0.6rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(18px);
    border-radius: 6px 0 0 6px;
    margin-right: 0;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .theme-tab-content {
    background: rgba(37, 37, 37, 0.9);
    border-color: rgba(255, 255, 255, 0.25);
}

.theme-tab:hover {
    transform: translateX(135px); /* ausfahren: nach rechts, Buttons werden sichtbar */
}

/* Footer im Fenster */
.finder-footer {
    border-top: 1px solid var(--border-color);
    background: var(--bg-sidebar);
    padding: 0.6rem 1.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: right;
}

.finder-footer a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.finder-footer a:hover {
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .finder-window {
        width: 100%;
        min-height: 500px;
    }

    .finder-sidebar {
        width: 180px;
    }

    .window-titlebar {
        height: 36px;
    }

    .window-control {
        width: 10px;
        height: 10px;
    }

    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 1rem;
    }

    .theme-btn {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .page-container {
        padding: 1rem;
    }

    .finder-window {
        border-radius: 8px;
    }

    .window-content {
        flex-direction: column;
    }

    .finder-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        max-height: 200px;
    }

    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
    }

    .sidebar-section {
        display: flex;
        margin-bottom: 0;
        margin-right: 1rem;
    }

    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}

