/* global.css */

:root {
    /* Apple-Style Colors (Heller Modus) */
    --bg: #ffffff;
    --bg-veil: #f5f5f7;
    --surface: #ffffff;
    --surface-soft: #fbfaf6;
    --ink: #1d1d1f;
    --ink-soft: #86868b;
    --border: #e5e5ea;
    --accent: #0071e3;
    --accent-strong: #0077ed;
    --accent-soft: rgba(0, 113, 227, 0.1);
    --accent-warm: #e07a5f;
    --success: #34c759;
    --danger: #ff3b30;
    --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.05);
    --shadow-strong: 0 16px 48px rgba(0, 0, 0, 0.1);
    --button-dark: #1d1d1f;
    
    /* Apple Typography */
    --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    --font-sans: var(--font-system);
    --font-display: var(--font-system);
    
    /* Radii */
    --radius-round: 50px;
    --radius-card: 20px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body.theme-dark, body {
    background-color: var(--bg);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.page {
    max-width: 1220px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 3rem;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    margin-bottom: 1.2rem;
}

.brand {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.brand-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.4rem;
    letter-spacing: 0.01em;
}

.brand-subtitle {
    font-size: 0.85rem;
    color: var(--ink-soft);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-links a {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    color: var(--ink);
    font-size: 0.9rem;
}

.nav-links a.active,
.nav-links a:hover {
    background: var(--accent-soft);
    border-color: rgba(42, 157, 143, 0.3);
    color: var(--accent-strong);
    text-decoration: none;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    margin: 0 0 0.7rem;
    font-weight: 600;
    color: var(--ink);
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.4rem;
}

h3 {
    font-size: 1.1rem;
}

p {
    margin: 0 0 0.5rem;
    color: var(--ink-soft);
}

a {
    color: var(--accent-strong);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.card {
    background: var(--surface);
    border-radius: 1rem;
    border: 1px solid var(--border);
    padding: 1.1rem 1.2rem;
    box-shadow: var(--shadow-soft);
    position: relative;
    animation: rise 0.5s ease both;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.card-title-group {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.card-subtitle {
    font-size: 0.9rem;
    color: var(--ink-soft);
}

.card-body {
    width: 100%;
}

.card-footer {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--ink-soft);
}

.section {
    margin-top: 1.75rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.section-subtitle {
    font-size: 0.9rem;
    color: var(--ink-soft);
}

.grid-two {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.badge {
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    border: 1px solid rgba(42, 157, 143, 0.4);
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-weight: 600;
}

.badge-secondary {
    border-color: var(--border);
    background: var(--surface-soft);
    color: var(--ink-soft);
}

.muted {
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.2rem;
    font-size: 0.9rem;
    margin-top: 0.4rem;
}

.meta-label {
    color: var(--ink-soft);
}

.meta-value {
    color: var(--ink);
    font-weight: 600;
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.45rem;
}

.pill {
    border-radius: 999px;
    border: 1px solid var(--border);
    padding: 0.15rem 0.7rem;
    font-size: 0.8rem;
    color: var(--ink-soft);
    background: var(--surface-soft);
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

th, td {
    padding: 0.55rem 0.6rem;
    text-align: right;
}

th {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--ink-soft);
    border-bottom: 1px solid var(--border);
}

td {
    border-bottom: 1px solid rgba(229, 220, 209, 0.7);
}

td.label-cell {
    text-align: left;
    color: var(--ink-soft);
    font-weight: 600;
}

.value-positive {
    color: var(--success);
    font-weight: 600;
}

.value-negative {
    color: var(--danger);
    font-weight: 600;
}

.crafting-recipes {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

.crafting-recipe-card {
    background: var(--surface);
    border-radius: 1rem;
    border: 1px solid var(--border);
    padding: 1rem 1.1rem;
    box-shadow: var(--shadow-soft);
}

.crafting-recipe-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
    gap: 0.75rem;
}

.crafting-recipe-header-title small {
    color: var(--ink-soft);
    font-size: 0.8rem;
}

.crafting-step {
    margin: 0.5rem 0;
}

.crafting-step-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
}

.crafting-children {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    margin-right: 0.5rem;
}

.crafting-arrow {
    font-size: 1.2rem;
    color: var(--accent-strong);
    padding: 0 0.15rem;
}

.item-box {
    border-radius: 0.8rem;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    padding: 0.45rem 0.7rem;
    min-width: 170px;
}

.item-title {
    font-weight: 600;
    margin-bottom: 0.15rem;
    font-size: 0.9rem;
}

.item-meta {
    font-size: 0.75rem;
    color: var(--ink-soft);
}

.recipe-label {
    font-size: 0.75rem;
    color: var(--ink-soft);
    margin-bottom: 0.2rem;
}

.stagger > * {
    animation: rise 0.55s ease both;
}

.stagger > *:nth-child(2) { animation-delay: 0.08s; }
.stagger > *:nth-child(3) { animation-delay: 0.16s; }
.stagger > *:nth-child(4) { animation-delay: 0.24s; }
.stagger > *:nth-child(5) { animation-delay: 0.32s; }

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 900px) {
    .grid-two {
        grid-template-columns: minmax(0, 1fr);
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ==========================================================================
   Apple-Style Product Showcase (Auction Detail Integration)
   ========================================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.product-showcase {
    padding: 3rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    width: 100%;
}

.product-visual {
    position: relative;
    border-radius: var(--radius-card);
    background-color: var(--bg-veil);
    padding: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    min-height: 250px;
}

.product-icon-placeholder {
    font-size: 6rem;
    color: var(--ink-soft);
    opacity: 0.5;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-visual:hover .product-icon-placeholder {
    transform: scale(1.05);
}

.glass-card {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: var(--shadow-soft);
}

.glass-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.glass-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--ink);
}

.product-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-category {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.product-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.product-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--ink-soft);
    margin-bottom: 2.5rem;
    max-width: 90%;
}

.product-price-wrapper {
    margin-bottom: 2.5rem;
}

.product-price {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    display: block;
    margin-bottom: 0.25rem;
    color: var(--ink);
}

.price-note {
    font-size: 0.85rem;
    color: var(--ink-soft);
}

.product-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.9rem 1.8rem;
    border-radius: var(--radius-round);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--button-dark);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #000000;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
    text-decoration: none;
    color: #ffffff;
}

.btn-secondary {
    background-color: transparent;
    color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--ink);
}

.btn-secondary:hover {
    background-color: rgba(0, 0, 0, 0.03); 
    box-shadow: inset 0 0 0 2px var(--ink);
    text-decoration: none;
    color: var(--ink);
}

@media (min-width: 900px) {
    .product-showcase {
        padding: 4rem 1rem;
    }

    .product-container {
        flex-direction: row;
        gap: 5rem;
        align-items: center;
    }

    .product-visual, .product-details {
        flex: 1;
    }

    .glass-card {
        right: auto;
        bottom: 2.5rem;
        left: 2.5rem;
        max-width: 250px;
    }

    .product-title {
        font-size: 3.5rem;
    }
    
    .product-description {
        font-size: 1.15rem;
    }
}
