:root {
    --bg-main: #f4e4cf;      /* Sand */
    --bg-box: #fff7ea;       /* Light Sand */
    --bg-content: #fffaf1;   /* Very Light */
    --accent: #a06d2e;       /* Marke */
    --accent-dark: #824f18;  /* Hover */
    --text-main: #3f2b1b;
    --text-muted: #7b6652;
    --shadow-soft: 0 6px 14px rgba(0,0,0,0.12);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #fffaf1 0, #f4e4cf 60%, #e3c8a7 100%);
    color: var(--text-main);
}

/* PAGE LAYOUT */

.page-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px 40px;
}

.main-content {
    width: 100%;
    max-width: 1200px;
}

/* HEADER */

.app-header {
    width: 100%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 12px;
}

.btn-back {
    border: none;
    background: rgba(255, 247, 234, 0.85);
    color: var(--accent-dark);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-back__icon {
    font-size: 0.9rem;
}

.btn-back:hover {
    background: #fffaf1;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.16);
}

.branding {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
}

.branding__logo {
    width: 500px;
    height: 100px;
    object-fit: contain;
    border-radius: 12px;
    background: #fff7ea;
    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
    align-items:center;
}

.branding__text {
    display: flex;
    flex-direction: column;
}

.branding__title {
    font-size: 1.15rem;
    margin: 0;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.branding__subtitle {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* INTRO */

.intro {
    background: rgba(255, 250, 241, 0.96);
    padding: 16px 18px;
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 22px;
    border: 1px solid rgba(162, 111, 56, 0.16);
}

.intro__title {
    margin: 0 0 6px;
    font-size: 1.2rem;
}

.intro__text {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* TOOLS BOARD */

.tools-board {
    background: rgba(255, 250, 241, 0.96);
    border-radius: 18px;
    padding: 20px 18px 24px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(162, 111, 56, 0.2);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px 20px;
    position: relative;
}

/* TOOL CARD */

.tool-card {
    display: block;
    position: relative;
    background: var(--bg-box);
    border-radius: 16px;
    padding: 16px 16px 18px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 6px 14px rgba(0,0,0,0.10);
    border: 1px solid rgba(162, 111, 56, 0.18);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease,
        background 0.2s ease;
    overflow: hidden;
}

/* “Wilde” Varianten – werden per JS random zugewiesen */

.tool-card--tilt-left {
    transform: rotate(-1.5deg);
}

.tool-card--tilt-right {
    transform: rotate(1.5deg);
}

.tool-card--lift {
    margin-top: -6px;
}

.tool-card--drop {
    margin-top: 8px;
}

.tool-card--nudge-left {
    margin-left: -4px;
}

.tool-card--nudge-right {
    margin-right: -4px;
}

.tool-card:hover {
    transform: translateY(-4px) scale(1.01) rotate(0deg);
    box-shadow: 0 10px 22px rgba(0,0,0,0.18);
    border-color: rgba(130, 79, 24, 0.75);
    background: #fffdf7;
}

/* BADGE & TEXT */

.tool-card__badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    background: rgba(160, 109, 46, 0.09);
    color: var(--accent-dark);
    margin-bottom: 8px;
}

.tool-card__title {
    margin: 0 0 6px;
    font-size: 1rem;
}

.tool-card__desc {
    margin: 0;
    font-size: 0.86rem;
    color: var(--text-muted);
}

/* RESPONSIVE */

@media (max-width: 768px) {
    .app-header {
        flex-direction: row-reverse;
        align-items: center;
    }

    .branding__title {
        font-size: 1rem;
    }

    .intro,
    .tools-board {
        padding: 14px 12px 18px;
    }

    .tools-grid {
        gap: 14px;
    }
}
/* LAYOUT MIT SIDEBAR */

.tools-layout {
    width: 100%;
    max-width: 1200px;
    display: flex;
    align-items: flex-start;
    gap: 100px; /* vorher 20px – jetzt ~3x Abstand */
    
    margin-top: 10px; /* oder 12-14px je nach Optik */


}


/* SIDEBAR BASIS */

.tools-sidebar {
    width: 260px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sidebar-section {
    background: rgba(255, 250, 241, 0.96);
    border-radius: 14px;
    padding: 10px 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.10);
    border: 1px solid rgba(162, 111, 56, 0.18);
}

.sidebar-section__title {
    margin: 0 0 6px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

/* 1. HISTORY-LISTE */

.history-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-list__item {
    font-size: 0.85rem;
    padding: 6px 8px;
    border-radius: 10px;
    background: rgba(99, 80, 56, 0.8);
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    transition: background 0.18s ease, transform 0.15s ease;
}

.history-list__item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-list__item:hover {
    background: #fffaf1;
    transform: translateY(-1px);
}

.history-list__item.is-empty {
    cursor: default;
    background: rgba(244, 228, 207, 0.4);
}

/* 2. INFO-FELD */

.sidebar-info__box {
    background: var(--bg-box);
    border-radius: 10px;
    padding: 8px 9px;
    border: 1px dashed rgba(162, 111, 56, 0.4);
}

.sidebar-info__headline {
    margin: 0 0 4px;
    font-size: 0.87rem;
    font-weight: 600;
}

.sidebar-info__text {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* 3. VERSION-BOX */

.sidebar-version {
    margin-top: auto; /* nach unten schieben */
    font-size: 0.78rem;
}

.sidebar-version__label {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.sidebar-version__value {
    font-weight: 700;
    margin-bottom: 2px;
}

.sidebar-version__meta {
    color: var(--text-muted);
}

/* RESPONSIVE: Sidebar unter Main bei kleineren Screens */

@media (max-width: 900px) {
    .tools-layout {
        flex-direction: column;
    }

    .tools-sidebar {
        width: 100%;
        flex-direction: row;
        align-items: stretch;
        gap: 10px;
    }

    .sidebar-section {
        flex: 1;
    }

    .sidebar-version {
        margin-top: 0;
    }
}
