/* =========================================
   Reevalued — Ready Implemented Theme
   ========================================= */

:root {
    color-scheme: light;

    /* 70/20/10 Rule */
    --bg-base: #F8F9FA; /* 70% White/Off-White */
    --bg-card: #FFFFFF;
    
    --text-primary: #121212; /* 20% Black */
    --text-secondary: #404040;
    --text-muted: #737373;
    
    --border: #E5E5E5;
    --border-soft: #F5F5F5;
    
    --brand-primary: #10B981; /* 10% Emerald Green */
    --brand-hover: #059669;
    --brand-light: #D1FAE5;
    
    --success: #10B981;
    --error: #EF4444;
    --info: #3B82F6;
    
    --shadow-soft: 0 16px 32px rgba(0,0,0,0.06);
    --shadow-hard: 0 4px 12px rgba(16, 185, 129, 0.15); /* Emerald soft glow */
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-slide-in {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toast-slide-out {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(120%); opacity: 0; }
}

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

html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    margin: 0;
    background: var(--bg-base);
    color: var(--text-primary);
    overflow-x: hidden;
}

.app {
    width: min(100%, 1200px);
    display: flex;
    flex-direction: column;
    gap: 60px;
    padding: 24px;
    padding-top: 100px; /* Space for navbar */
}

.hero,
.toolbar,
.background-panel,
.canvas-wrapper,
.title-panel,
.hashtag-panel,
.valuator-panel,
.note {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
}

.hero {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 30px;
    position: relative;
    overflow: hidden;
}

.hero-copy {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.eyebrow {
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 11px;
    font-weight: 800;
}

.hero h1 {
    margin: 0;
    font-size: clamp(2.2rem, 5vw, 4.2rem);
    font-weight: 800;
    line-height: 0.92;
    letter-spacing: -0.08em;
}

.hero-desc {
    max-width: 62ch;
    line-height: 1.75;
    color: var(--text-secondary);
    font-size: 0.97rem;
}

.status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 360px;
}

.status-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.58rem 0.9rem;
    border-radius: 999px;
    background: var(--text-primary);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
    border: 1px solid #111;
}

.toolbar {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
}

.controls-wrapper {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.control-block {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.file-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 18px;
    border-radius: var(--radius-md);
    background: #ffffff;
    border: 2px dashed var(--border);
    color: var(--text-primary);
    cursor: pointer;
    width: fit-content;
    font-size: 0.9rem;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.file-label:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hard);
}

input[type='file'] {
    opacity: 0;
    position: absolute;
    z-index: -1;
    width: 0.1px;
    height: 0.1px;
}

input[type='file']::file-selector-button {
    display: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

button,
.category-select {
    border: 1px solid var(--border);
    cursor: pointer;
    border-radius: var(--radius-md);
    font-weight: 800;
    font-size: 0.9rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hard);
}

button:active {
    transform: translateY(0) scale(0.98);
    box-shadow: none;
}

button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid #111;
    outline-offset: 3px;
}

.button-row,
.panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.button-row button,
button.secondary,
button.primary-gradient,
.ghost-button,
.copy-hashtags-btn,
.category-select {
    padding: 12px 16px;
}

.button-row button,
button.secondary,
.copy-hashtags-btn {
    background: #111111;
    color: #ffffff;
}

.button-row button:hover,
button.secondary:hover,
.copy-hashtags-btn:hover {
    background: #ffffff;
    color: #111111;
}

button.primary-gradient {
    background: linear-gradient(135deg, #111 0%, #202020 45%, #000 100%);
    color: #ffffff;
}

button.primary-gradient:hover {
    background: #ffffff;
    color: #111111;
}

.ghost-button,
.category-select {
    background: #ffffff;
    color: #111111;
}

.ghost-button:hover {
    background: #111111;
    color: #ffffff;
}

.mini-note {
    max-width: 42ch;
    color: var(--text-muted);
    line-height: 1.55;
    font-size: 0.83rem;
}

.sliders {
    gap: 18px;
}

.slider-group {
    display: grid;
    gap: 10px;
}

.slider-label-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.9rem;
    font-weight: 800;
}

.slider-label-row span {
    color: var(--text-muted);
    font-weight: 700;
}

input[type='range'] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 9px;
    background: #ffffff;
    border: 1px solid #111111;
    border-radius: 999px;
    outline: none;
    cursor: pointer;
}

input[type='range']::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #111111;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px #111111;
    cursor: pointer;
}

input[type='range']::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #111111;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px #111111;
    cursor: pointer;
}

.background-panel,
.title-panel,
.hashtag-panel,
.valuator-panel {
    display: grid;
    gap: 16px;
    padding: 22px;
}

.panel-header {
    display: grid;
    gap: 5px;
}

.row-header {
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 14px;
}

.panel-header h2 {
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.panel-header p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.88rem;
}

.preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 12px;
    max-height: 390px;
    overflow-y: auto;
    padding: 8px;
}

.preset-card {
    padding: 0;
    padding-bottom: 100%; /* Classic aspect ratio hack to prevent grid overlapping bugs */
    height: 0;
    width: 100%;
    display: block;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    position: relative;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.preset-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hard);
}

.preset-card.active {
    transform: none !important;
    box-shadow: 0 0 0 4px #101010 !important;
}

.preset-preview {
    position: absolute;
    inset: 0;
    background: #ffffff;
    overflow: hidden;
    margin: 0;
    border: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preset-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.clean-preset-text {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
}

.preset-label {
    font-size: 0.78rem;
    line-height: 1.25;
}

.canvas-wrapper {
    position: relative;
    display: grid;
    justify-content: center;
    padding: 22px;
    flex: 1 1 500px;
    max-width: 540px;
    width: 100%;
}

canvas {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: var(--radius-lg);
    background: transparent;
    touch-action: none; /* Prevents native zoom when pinching the canvas */
    border: 1px solid var(--border);
}

.title-input-row,
.hashtag-input-row {
    display: grid;
    gap: 10px;
}

.title-input-row label,
.hashtag-input-row label {
    font-size: 0.9rem;
    font-weight: 800;
}

textarea,
.input-group input,
.hashtag-text {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #ffffff;
    color: var(--text-primary);
    font: inherit;
    font-size: 0.92rem;
    outline: none;
    line-height: 1.55;
}

textarea {
    resize: none;
    height: 82px;
}

textarea::placeholder,
.input-group input::placeholder {
    color: var(--text-muted);
}

.input-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.input-group input {
    flex: 1;
    min-width: 190px;
}

.title-results,
.hashtag-results {
    display: grid;
    gap: 9px;
}

.title-option {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: #111111;
    text-align: left;
    border: 1px solid #111111;
    font-size: 0.9rem;
    animation: fade-in-up 0.28s ease both;
}

.title-option:hover,
.title-option.copied {
    background: #111111;
    color: #ffffff;
}

.hashtag-list-container {
    display: grid;
    gap: 12px;
}

.hashtag-text {
    min-height: 92px;
    resize: vertical;
    color: var(--text-secondary);
}

.copy-hashtags-btn {
    width: fit-content;
}

.drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    background: var(--bg-secondary);
    margin-bottom: 10px;
    outline: none;
}

.drop-zone:hover {
    border-color: var(--text-muted);
    background: var(--bg-card);
}

.drop-zone.drag-over {
    border-color: #3b82f6;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    pointer-events: none;
}

.drop-zone-content label {
    pointer-events: auto;
}

.drop-zone-icon {
    font-size: 2rem;
    line-height: 1;
}

.drop-zone-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

.valuator-results {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 10px;
    animation: fade-in-up 0.3s ease both;
}

.tag-upload-btn {
    display: inline-block;
    padding: 8px 12px;
    background: #f0f0f0;
    border: 1px dashed #aaaaaa;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    text-align: center;
}

.tag-upload-btn:hover {
    background: #e4e4e4;
    border-color: #888888;
}

.tag-file-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
    margin-bottom: 8px;
    text-align: center;
    min-height: 14px;
}

.valuator-notes {
    margin-top: 10px;
    padding: 12px;
    background: #f8f9fa;
    border-left: 3px solid #111111;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    animation: fade-in-up 0.3s ease both;
}

.price-card {
    padding: 16px;
    border-radius: var(--radius-md);
    background: #ffffff;
    border: 1px solid var(--border-soft);
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.price-card h4 {
    margin: 0 0 8px 0;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.price-card .price {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
}

.price-card.depop { border-top: 4px solid #ff2a2a; }
.price-card.fb { border-top: 4px solid #1877f2; }
.price-card.vinted { border-top: 4px solid #00bbbf; }

.profit-data {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-soft);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.profit-amount {
    margin-bottom: 4px;
}

.buy-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.buy-badge.buy {
    background: #e6f4ea;
    color: #137333;
}

.buy-badge.pass {
    background: #fce8e6;
    color: #c5221f;
}

.loading {
    position: absolute;
    top: 35px;
    left: 50%;
    transform: translateX(-50%);
    padding: 11px 18px;
    background: #111111;
    color: #ffffff;
    border-radius: 999px;
    border: 1px solid #ffffff;
    font-size: 0.88rem;
    font-weight: 800;
    display: none;
    z-index: 10;
}

.note {
    padding: 16px 20px;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.65;
}

code {
    padding: 3px 7px;
    border-radius: 7px;
    background: #ffffff;
    border: 1px solid var(--border-soft);
    color: var(--text-primary);
    font-size: 0.86em;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}

.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    min-width: 290px;
    max-width: 430px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    background: #ffffff;
    border: 1px solid #111111;
    color: #111111;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.45;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toast-slide-in 0.24s ease forwards;
    box-shadow: var(--shadow-hard);
}

.toast.leaving {
    animation: toast-slide-out 0.24s ease forwards;
}

.toast::before {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.74rem;
    font-weight: 900;
}

.toast-error::before {
    content: '!';
    background: var(--error);
}

.toast-success::before {
    content: 'i';
    background: var(--info);
    font-style: italic;
}

.toast-info::before {
    content: 'i';
    background: var(--info);
    font-style: italic;
}

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

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

::-webkit-scrollbar-thumb {
    background: #111111;
    border-radius: 999px;
}

::selection {
    background: #111111;
    color: #ffffff;
}

@media (max-width: 900px) {
    body {
        padding: 16px;
    }

    .toolbar {
        flex-direction: column;
    }
    
    .controls-wrapper {
        grid-template-columns: 1fr;
    }

    .row-header {
        grid-template-columns: 1fr;
    }

    .preset-grid {
        grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
        max-height: 430px;
    }
}

@media (max-width: 560px) {
    body {
        padding: 10px;
    }

    .app {
        gap: 60px;
    }

    .drop-zone-text {
        display: none;
    }

    .hero,
    .toolbar,
    .background-panel,
    .title-panel,
    .hashtag-panel,
    .valuator-panel,
    .canvas-wrapper {
        padding: 16px;
        border-radius: 20px;
    }

    .hero h1 {
        font-size: 2.7rem;
    }

    .button-row,
    .input-group,
    .panel-actions {
        flex-direction: column;
    }

    .button-row button,
    button.secondary,
    button.primary-gradient,
    .ghost-button,
    .copy-hashtags-btn,
    .category-select {
        width: 100%;
    }

    .toast-container {
        top: 12px;
        right: 12px;
        left: 12px;
    }

    .toast {
        min-width: unset;
        max-width: unset;
    }
}

.preset-label {
    display: none;
}

.upload-canvas {
    width: 500px;
    max-width: 100%;
    margin: 10px auto 0;
    padding: 0;
    box-shadow: none;
    background: transparent;
    border: none;
    grid-column: 1 / -1;
    justify-self: center;
}

.upload-canvas canvas {
    width: 100%;
    max-width: 500px;
    height: auto;
    aspect-ratio: 1/1;
    display: block;
    margin: 0 auto;
}

/* Auth Modal */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.auth-content {
    background: var(--bg-primary);
    padding: 10px 30px;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
    position: relative;
}

.auth-content h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
}

.auth-content input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    box-sizing: border-box;
}

.auth-content input:focus {
    outline: none;
    border-color: var(--accent);
}


/* =========================================
   Navbar & Slide-out Panels
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    justify-content: center;
}

.navbar-content {
    width: min(100%, 1200px);
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
}

.navbar-logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.04em;
    display: flex;
    align-items: baseline;
    gap: 4px;
}


.navbar-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    background: none;
    border: none;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s ease;
    font-family: inherit;
}

.nav-link:hover {
    color: var(--brand-primary);
}

/* Side Panel / Modal overlay */
.side-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.side-panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

.side-panel {
    position: fixed;
    top: 0;
    left: -450px;
    width: min(100vw, 450px);
    height: 100vh;
    height: 100dvh;
    background: var(--bg-card);
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    z-index: 2001;
    transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overscroll-behavior: contain;
}

.side-panel.active {
    left: 0;
}

.panel-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 20px;
    align-self: flex-end;
    transition: color 0.2s;
}

.panel-close:hover {
    color: var(--brand-primary);
}

.panel-content {
    flex: 1;
    padding: 0 40px 40px;
    overflow-y: auto;
}

.panel-content h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.panel-content p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.panel-content ul {
    list-style: none;
    margin-bottom: 20px;
}

.panel-content li {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.panel-content li::before {
    content: "âœ¦";
    color: var(--brand-primary);
    font-size: 1.1rem;
}

/* Glassmorphism overrides for tool panels to make them look premium */
.hero, .toolbar, .background-panel, .title-panel, .hashtag-panel, .valuator-panel {
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    background: rgba(255, 255, 255, 0.6);
    margin-bottom: 24px;
}

/* Emerald green gradient for buttons */
.primary-gradient {
    background: linear-gradient(135deg, var(--brand-primary) 0%, #059669 100%) !important;
    color: white !important;
    border: none !important;
}

button.primary {
    background: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: white !important;
}

button.primary:hover {
    background: var(--brand-hover) !important;
}

.status-tag {
    background: rgba(16, 185, 129, 0.1) !important;
    color: var(--brand-primary) !important;
    font-weight: 600;
}

/* Hero Gallery Showcase */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero h1 {
    text-align: center;
    width: 100%;
}

.hero-gallery {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 280px;
    margin: 20px auto 0;
    display: flex;
    justify-content: center;
}

.showcase-img {
    position: absolute;
    width: 180px;
    height: 240px;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 6px solid var(--bg-card);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.showcase-img:hover {
    z-index: 10 !important;
}

.img1 {
    transform: translateX(-160px) translateY(30px) rotate(-8deg);
    z-index: 1;
}

.img1:hover {
    transform: translateX(-160px) translateY(10px) rotate(-4deg) scale(1.05);
}

.img2 {
    transform: translateX(0) translateY(0) rotate(0deg);
    z-index: 2;
}

.img2:hover {
    transform: translateX(0) translateY(-20px) rotate(0deg) scale(1.05);
}

.img3 {
    transform: translateX(160px) translateY(30px) rotate(8deg);
    z-index: 1;
}

.img3:hover {
    transform: translateX(160px) translateY(10px) rotate(4deg) scale(1.05);
}

.mobile-only-title { display: none; }

/* =========================================
   Mobile Responsiveness (Phones & Tablets)
   ========================================= */
@media (max-width: 768px) {
    /* Navbar Mobile Adaptations */
    .navbar-content {
        padding: 0 16px;
        flex-direction: row;
        justify-content: space-between;
    }
    
    .navbar {
        height: auto;
        padding: 12px 0;

    }
    
    .app {
        padding-top: 120px; /* Accommodate taller stacked navbar */
        padding-left: 12px;
        padding-right: 12px;
    }

    .navbar-links {
        gap: 16px;
    }
    
    .nav-link {
        font-size: 0.85rem;
    }

    /* Hero Gallery Mobile Adaptations */
    .hero-gallery {
        height: 180px; /* Reduce container height */
    }

    .showcase-img {
        width: 75px;
        height: 105px;
        border-width: 2px;
    }

    .img1 {
        transform: translateX(-55px) translateY(15px) rotate(-8deg);
    }
    .img1:hover {
        transform: translateX(-55px) translateY(5px) rotate(-4deg) scale(1.05);
    }

    .img2 {
        transform: translateX(0) translateY(0) rotate(0deg);
    }
    .img2:hover {
        transform: translateX(0) translateY(-5px) rotate(0deg) scale(1.05);
    }

    .img3 {
        transform: translateX(55px) translateY(15px) rotate(8deg);
    }
    .img3:hover {
        transform: translateX(55px) translateY(5px) rotate(4deg) scale(1.05);
    }

    /* Side panel mobile adaptation */
    .side-panel {
        width: 100vw;
        left: -100vw;
    }
    
    .panel-content {
        padding: 0 20px 40px;
    }
    
    .hero {
        padding: 5px 12px;
    }
    
    .hero h1 {
        font-size: 2.2rem;
        margin-bottom: 0;
    }
    
    .testimonials-banner {
        flex-direction: column;
        align-items: center;
        padding: 4px;
        gap: 6px;
        margin-top: 0;
    }
    .testimonials-title {
        font-size: 14px;
        letter-spacing: 0;
        text-align: center;
        margin-left: 0;
        padding-left: 0;
        width: 100%;
    }
    .testimonials-scroll-wrapper {
        width: 100%;
    }
    .testimonials-track {
        gap: 10px;
    }
    .testimonial-card {
        width: 100px;
        padding: 6px;
        border-radius: 8px;
    }
    .testimonial-card img {
        height: 80px;
    }
    .testimonial-name {
        font-size: 0.55rem;
    }
    .testimonial-est {
        font-size: 0.65rem;
    }
    .testimonial-sold {
        font-size: 0.85rem;
        margin-bottom: 2px;
    }
}


/* Custom Active State for non-green buttons requested by User */
.button-row button, button.secondary, a.secondary, .file-label, .tag-upload-btn, .ghost-button, #navIntro, #navAbout, #navTips, .panel-close {
    background: #111111 !important;
    color: #ffffff !important;
    border: 1px solid #333333 !important;
    border-radius: 8px !important;
    padding: 12px 18px !important;
    transition: all 0.2s ease !important;
}

.button-row button:active, button.secondary:active, a.secondary:active, .file-label:active, .tag-upload-btn:active, .ghost-button:active, .button-row button:hover, button.secondary:hover, a.secondary:hover, .file-label:hover, .tag-upload-btn:hover, .ghost-button:hover, #navIntro:active, #navAbout:active, #navTips:active, .panel-close:active, #navIntro:hover, #navAbout:hover, #navTips:hover, .panel-close:hover {
    background: #ffffff !important;
    color: #111111 !important;
    box-shadow: 0 0 14px #50c878 !important;
    border-color: #50c878 !important;
    transform: translateY(1px) !important;
}

/* ==========================================
   HUB LAYOUT
   ========================================== */
.hub-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    width: 100%;
    min-height: calc(100vh - 160px); /* Account for navbar and padding */
    padding: 40px 20px;
    box-sizing: border-box;
}

.hub-card {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1 / 1;
    background: #111111;
    color: #ffffff;
    border: 1px solid #111111;
    border-radius: 24px;
    font-size: 2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box;
    padding: 40px;
}

.hub-card:hover {
    background: #ffffff;
    color: #111111;
    border-color: #50c878;
    box-shadow: 0 0 24px rgba(80, 200, 120, 0.6);
    transform: translateY(-4px);
}

.hub-card:active {
    transform: translateY(1px);
}


/* Global Footer Styles */
.site-footer {
    width: 100%;
    padding: 30px 20px;
    text-align: center;
    background-color: transparent;
    color: var(--text-muted, #666);
    font-size: 0.9rem;
    margin-top: 40px;
}

.site-footer a {
    color: var(--text-muted, #666);
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.site-footer a:hover {
    color: var(--emerald, #50c878);
}

.site-footer p {
    margin: 10px 0 0 0;
    opacity: 0.7;
    font-size: 0.85rem;
}



/* AI Canvas Scanning Animation */
.canvas-scanner {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 50;
    background: rgba(80, 200, 120, 0.05); 
    overflow: hidden;
}

.scan-line {
    position: absolute;
    background: #50c878;
    box-shadow: 0 0 15px 3px #50c878, 0 0 30px 5px rgba(80,200,120,0.6);
    opacity: 0;
}

.ttb {
    width: 100%; height: 4px; left: 0;
    animation: scanTTB 4s linear infinite;
}
.ltr {
    width: 4px; height: 100%; top: 0;
    animation: scanLTR 4s linear infinite;
}
.btt {
    width: 100%; height: 4px; left: 0;
    animation: scanBTT 4s linear infinite;
}
.rtl {
    width: 4px; height: 100%; top: 0;
    animation: scanRTL 4s linear infinite;
}

@keyframes scanTTB {
    0% { top: 0; opacity: 1; }
    24% { top: 100%; opacity: 1; }
    25% { opacity: 0; top: 100%; }
    100% { opacity: 0; }
}
@keyframes scanLTR {
    0% { opacity: 0; }
    24.9% { opacity: 0; left: 0; }
    25% { left: 0; opacity: 1; }
    49% { left: 100%; opacity: 1; }
    50% { opacity: 0; left: 100%; }
    100% { opacity: 0; }
}
@keyframes scanBTT {
    0% { opacity: 0; }
    49.9% { opacity: 0; bottom: 0; }
    50% { bottom: 0; opacity: 1; }
    74% { bottom: 100%; opacity: 1; }
    75% { opacity: 0; bottom: 100%; }
    100% { opacity: 0; }
}
@keyframes scanRTL {
    0% { opacity: 0; }
    74.9% { opacity: 0; right: 0; }
    75% { right: 0; opacity: 1; }
    99% { right: 100%; opacity: 1; }
    100% { opacity: 0; right: 100%; }
}

/* Explicit Eraser Active State */
#eraserToggleButton.primary {
    background: #10B981 !important;
    border-color: #10B981 !important;
    color: #ffffff !important;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.6) !important;
}

#studioInterface, #valuatorInterface {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

@media (max-width: 560px) {
    .upload-row {
        flex-direction: column;
    }
    .upload-row .take-photo-btn {
        order: -1;
        width: 100%;
    }
    .upload-row .file-label {
        width: 100%;
    }
    .upload-row button#uploadTipBtn {
        width: 100%;
    }
}

.showcase-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    margin-bottom: 20px;
    position: relative;
    height: 300px;
}

.hero-showcase-img {
    width: 280px;
    height: 280px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(80, 200, 120, 0.6);
    will-change: transform;
    position: absolute;
}

.img-left {
    transform: rotate(-10deg) translateX(-185px) translateZ(0);
    z-index: 1;
}

.img-center {
    transform: translateZ(0);
    z-index: 3;
    position: relative;
}

.img-right {
    transform: rotate(10deg) translateX(185px) translateZ(0);
    z-index: 2;
}

@media (max-width: 560px) {
    .showcase-container {
        height: 180px;
        margin-top: -40px;
    }
    .hero-showcase-img {
        width: 140px;
        height: 140px;
    }
    .img-left {
        transform: rotate(-10deg) translateX(-85px) translateZ(0);
    }
    .img-right {
        transform: rotate(10deg) translateX(85px) translateZ(0);
    }
}

.generated-item {
    padding: 12px 16px;
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.generated-item:hover {
    background: var(--surface-hover);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.generated-item:active {
    transform: translateY(0);
}

/* Hide 'Take Photo' buttons on desktop/laptops */
@media (min-width: 769px) {
    .take-photo-btn {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .valuator-camera-btn {
        display: none !important;
    }
}

/* Marquee Styles */
.marquee-wrapper {
    width: 100%;
    overflow: hidden;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
    margin-bottom: 20px;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.marquee-content {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 20s linear infinite;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.marquee-content:hover {
    animation-play-state: paused;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.marquee-item {
    display: inline-flex;
    align-items: center;
    margin-right: 40px;
    gap: 8px;
}

.marquee-item span.sold {
    color: var(--brand-primary);
    font-weight: 700;
}




/* Testimonials Banner */
.testimonials-banner {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 30px;
    background: #fdfdfd;
    padding: 10px 30px;
    border-top: 1px solid #eaeaea;
    border-bottom: 1px solid #eaeaea;
    margin-top: 5px;
}
.testimonials-track {
    display: flex;
    gap: 15px;
    width: max-content;
    animation: scrollTestimonials 40s linear infinite;
}
.testimonials-track:hover {
    animation-play-state: paused;
}
.testimonial-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    width: 140px;
    text-align: center;
    transition: transform 0.2s ease;
}
.testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.testimonial-card img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    border-radius: 8px;
    background: #f9f9f9;
}
.testimonial-est {
    font-size: 0.75rem;
    color: #000;
    margin-top: 4px;
    margin-bottom: 2px;
    font-weight: 600;
}
.testimonial-sold {
    font-size: 1.10rem;
    font-weight: 800;
    color: #50c878;
    margin-bottom: 6px;
}
@keyframes scrollTestimonials {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}


.testimonials-title {
    font-size: 21px;
    color: #000;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}
.testimonials-scroll-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
}


.testimonial-name {
    font-size: 0.60rem;
    color: #444;
    font-weight: 700;
    margin-top: 6px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}
