/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2BA8A2;
    --primary-light: #3CC4BD;
    --primary-dark: #1E8C86;
    --accent: #FFD23F;
    --accent-light: #FFE47A;
    --accent-dark: #E6B800;
    --coral: #EF6C4A;
    
    --bg: #EFF8F7;
    --bg-subtle: #E8F6F5;
    --surface: #FFFFFF;
    --surface-glass: rgba(255, 255, 255, 0.9);
    --surface-hover: #FFF8E7;
    
    --border: rgba(43, 168, 162, 0.15);
    --border-strong: rgba(43, 168, 162, 0.3);
    
    --text: #1E8C86;
    --text-secondary: rgba(30, 140, 134, 0.85);
    --text-muted: rgba(30, 140, 134, 0.7);
    --text-invert: #ffffff;
    
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.16);
    --shadow-glow: 0 2px 10px rgba(43, 168, 162, 0.30);
    --shadow-accent-glow: 0 2px 10px rgba(255, 210, 63, 0.40);
    --shadow-coral-glow: 0 2px 10px rgba(239, 108, 74, 0.35);
    --shadow-card: 0 2px 10px rgba(43, 168, 162, 0.10);
    
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-round: 999px;
    
    --transition: 300ms cubic-bezier(0.175, 0.885, 0.32, 1.2);
    --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ===== BACKGROUND BLOBS ===== */
.bg-blobs {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    animation: blobFloat 20s ease-in-out infinite;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary-lighter), transparent 70%);
    top: -10%;
    left: -5%;
    animation-delay: 0s;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #a7f3d0, transparent 70%);
    top: 50%;
    right: -8%;
    animation-delay: -7s;
    animation-duration: 25s;
}

.blob-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #99f6e4, transparent 70%);
    bottom: -5%;
    left: 30%;
    animation-delay: -14s;
    animation-duration: 22s;
}

@keyframes blobFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(40px, -30px) scale(1.05);
    }

    50% {
        transform: translate(-20px, 40px) scale(0.95);
    }

    75% {
        transform: translate(30px, 20px) scale(1.02);
    }
}

/* ===== LAYOUT ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== HEADER ===== */
.header {
    position: relative;
    z-index: 10;
    padding: 28px 0 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo h1 {
    font-size: 1.6rem;
    font-weight: 800; letter-spacing: 1px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.subtitle {
    margin-top: 6px;
    margin-left: 50px;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* ===== MODE NAV TABS ===== */
.mode-nav {
    position: relative;
    z-index: 10;
    display: flex;
    gap: 4px;
    padding-top: 16px;
    padding-bottom: 0;
}

.mode-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font);
    font-size: 0.88rem;
    font-weight: 800; letter-spacing: 1px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius) var(--radius) 0 0;
    background: var(--surface-glass);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid var(--border);
    border-bottom: none;
    position: relative;
}

.mode-tab:hover {
    color: var(--primary-dark);
    background: var(--surface-hover);
}

.mode-tab.active {
    color: var(--primary-dark);
    background: var(--surface);
    border-color: var(--border-strong);
}

.mode-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--surface);
}

.mode-tab svg {
    flex-shrink: 0;
}

/* ===== SPLIT MODE STYLES ===== */
.split-count-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.split-count-btn {
    flex: 1;
    font-family: var(--font);
    font-size: 1.1rem;
    font-weight: 800; letter-spacing: 1px;
    padding: 12px 8px;
    border: 2px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.split-count-btn:hover {
    border-color: var(--primary);
    color: var(--primary-dark);
}

.split-count-btn.active {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.split-pieces-row {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.split-piece-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.split-piece-wrap canvas {
    display: block;
    image-rendering: pixelated;
    border-radius: 4px;
    border: 1px solid var(--border);
    background-image:
        linear-gradient(45deg, #e2e8f0 25%, transparent 25%),
        linear-gradient(-45deg, #e2e8f0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e2e8f0 75%),
        linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
}

.split-piece-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 800; letter-spacing: 1px;
}

#splitPreviewCanvas {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    cursor: crosshair;
}

#splitPreviewCanvas.checkerboard {
    background-image:
        linear-gradient(45deg, #e2e8f0 25%, transparent 25%),
        linear-gradient(-45deg, #e2e8f0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e2e8f0 75%),
        linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
}

/* ===== MAIN GRID ===== */
.main-grid {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 28px;
    padding-top: 20px;
    padding-bottom: 60px;
}

.panel-settings {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.panel-preview {
    position: sticky;
    top: 20px;
    align-self: start;
}

/* ===== CARDS ===== */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 22px;
    transition: all var(--transition);
    box-shadow: var(--shadow-card);
    border: none;
    border-left: 4px solid var(--primary-light);
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
}

.card h3 {
    font-size: 0.95rem;
    font-weight: 800; letter-spacing: 1px;
    color: var(--text);
    margin-bottom: 16px;
    letter-spacing: -0.2px;
}

.card-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 14px;
    line-height: 1.5;
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

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

/* ===== UPLOAD ZONE ===== */
.upload-zone {
    border: 2px dashed var(--border-strong);
    background: var(--surface-glass);
    cursor: pointer;
    user-select: none;
    transition: all var(--transition);
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--primary);
    background: rgba(16, 185, 129, 0.04);
    box-shadow: var(--shadow-glow);
}

.upload-zone.drag-over {
    transform: scale(1.01);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 0;
}

.upload-icon {
    color: var(--primary-light);
    transition: transform var(--transition);
}

.upload-zone:hover .upload-icon {
    transform: translateY(-4px);
}

.upload-text {
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.upload-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font);
    font-weight: 800;
    font-size: 14px;
    border: none;
    border-radius: var(--radius-round);
    padding: 10px 22px;
    min-height: 48px; /* >72rpx touch target minimum */
    cursor: pointer;
    transition: all var(--transition);
    user-select: none;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(180deg, var(--accent-light) 0%, var(--accent) 100%);
    color: var(--primary-dark);
    box-shadow: var(--shadow-accent-glow);
}

.btn-primary:hover {
    transform: scale(0.97);
    box-shadow: var(--shadow-accent-glow), 0 4px 16px rgba(255, 210, 63, 0.6);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background: var(--surface);
    color: var(--primary-dark);
    border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
    background: var(--bg-subtle);
    border-color: var(--primary);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
    border-radius: 6px;
}

.btn-download {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
    border-radius: var(--radius);
    letter-spacing: -0.2px;
}

.btn-download:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== INFO CARD ===== */
.info-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), rgba(6, 182, 212, 0.04));
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 0.85rem;
}

.info-row span:first-child {
    color: var(--text-muted);
}

.info-row span:last-child {
    font-weight: 800; letter-spacing: 1px;
    color: var(--text);
}

.size-limit span:last-child {
    color: var(--primary-dark);
    font-weight: 800; letter-spacing: 1px;
}

/* ===== SIZE WARNING ===== */
.size-warning {
    margin-top: 10px;
    padding: 10px 14px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: #b45309;
    font-weight: 500;
    animation: shake 0.4s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px);
    }

    75% {
        transform: translateX(4px);
    }
}

/* ===== DIMENSION INPUTS ===== */
.dimension-inputs {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 18px;
}

.dim-group {
    flex: 1;
}

.dim-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-field {
    width: 100%;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 800; letter-spacing: 1px;
    padding: 10px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    transition: all var(--transition);
    text-align: center;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.lock-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    margin-bottom: 2px;
}

.lock-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.lock-btn:hover {
    border-color: var(--primary);
}

/* ===== PRESETS ===== */
.presets {
    margin-top: 4px;
}

.presets-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preset-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.preset-btn {
    font-family: var(--font);
    font-size: 0.78rem;
    font-weight: 800; letter-spacing: 1px;
    padding: 6px 12px;
    border: 1px solid var(--border-strong);
    border-radius: 20px;
    background: var(--surface);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.preset-btn:hover {
    border-color: var(--primary);
    color: var(--primary-dark);
    background: rgba(16, 185, 129, 0.05);
}

.preset-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* ===== FORMAT SELECTOR ===== */
.format-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.format-btn {
    flex: 1;
    font-family: var(--font);
    font-size: 0.88rem;
    font-weight: 800; letter-spacing: 1px;
    padding: 10px 16px;
    border: 2px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.format-btn:hover {
    border-color: var(--primary);
    color: var(--primary-dark);
}

.format-btn.active {
    border-color: var(--primary);
    background: rgba(16, 185, 129, 0.06);
    color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* ===== SHAPE SELECTOR ===== */
.shape-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.shape-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-family: var(--font);
    font-size: 0.78rem;
    font-weight: 800; letter-spacing: 1px;
    padding: 12px 8px;
    border: 2px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.shape-btn:hover {
    border-color: var(--primary);
    color: var(--primary-dark);
}

.shape-btn.active {
    border-color: var(--primary);
    background: rgba(16, 185, 129, 0.06);
    color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.shape-btn svg {
    color: currentColor;
}

/* ===== SLIDERS ===== */
.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, var(--primary), var(--primary-lighter));
    outline: none;
    margin: 10px 0;
    cursor: pointer;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: all var(--transition);
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    cursor: pointer;
}

.quality-control label,
#toleranceSection label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 2px;
}

/* ===== TOGGLE SWITCH ===== */
.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.toggle-label {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: #cbd5e1;
    border-radius: 26px;
    transition: all var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    transition: all var(--transition);
}

.toggle-switch input:checked+.toggle-slider {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(20px);
}

/* ===== PREVIEW ===== */
.preview-card {
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.preview-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    min-height: 300px;
}

.preview-placeholder {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    padding: 60px 20px;
}

#previewCanvas {
    max-width: 100%;
    max-height: 400px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    cursor: crosshair;
}

#previewCanvas.checkerboard {
    background-image:
        linear-gradient(45deg, #e2e8f0 25%, transparent 25%),
        linear-gradient(-45deg, #e2e8f0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e2e8f0 75%),
        linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
}

.output-preview-wrap {
    display: inline-block;
    padding: 12px;
    border-radius: var(--radius-sm);
    background-image:
        linear-gradient(45deg, #e2e8f0 25%, transparent 25%),
        linear-gradient(-45deg, #e2e8f0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e2e8f0 75%),
        linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
    border: 1px solid var(--border);
}

#outputCanvas {
    display: block;
    image-rendering: pixelated;
}

#outputPreview h4 {
    font-size: 0.85rem;
    font-weight: 800; letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-align: center;
}

.output-dims {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    font-weight: 500;
}

.preview-controls {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.toggle-row-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}

.toggle-row-inline input {
    accent-color: var(--primary);
}

/* ===== FOOTER ===== */
.footer {
    position: relative;
    z-index: 10;
    padding: 24px 0;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== WAND CURSOR ===== */
.wand-active #previewCanvas {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='2'%3E%3Cpath d='M15 4V2m0 14v-2M8 9h2m10 0h2m-4.2-3.8 1.4-1.4m-10.4 10.4 1.4-1.4M17.8 17.8l1.4 1.4M4.2 4.2l1.4 1.4'/%3E%3Cpath d='m2 21 9.5-9.5M15 8l-6.5 6.5'/%3E%3C/svg%3E") 2 22, crosshair;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 860px) {
    .main-grid {
        grid-template-columns: 1fr;
    }

    .panel-preview {
        position: static;
        order: -1;
    }

    .subtitle {
        margin-left: 0;
        margin-top: 8px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 14px;
    }

    .card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 22px;
    transition: all var(--transition);
    box-shadow: var(--shadow-card);
    border: none;
    border-left: 4px solid var(--primary-light);
}

    .preset-btns {
        gap: 4px;
    }

    .preset-btn {
        padding: 5px 9px;
        font-size: 0.72rem;
    }
}

/* ===== SAVE STATUS ===== */
.save-status {
    margin-top: 12px;
    font-size: 0.85rem;
    text-align: center;
    line-height: 1.6;
}

.status-saving {
    color: var(--primary-dark);
    font-weight: 500;
}

.status-success {
    color: #059669;
    font-weight: 800; letter-spacing: 1px;
}

.status-path {
    color: var(--text-muted);
    font-size: 0.75rem;
    word-break: break-all;
}

.status-error {
    color: #dc2626;
    font-weight: 500;
}

/* ===== LOADING ANIMATION ===== */
.processing {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.processing::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.1), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(100%);
    }
}
/* ===== FLIP7 DESIGN SYSTEM EXTRAS ===== */
.logo-container {
    display: flex;
    justify-content: center;
    padding: 24px 0 32px 0;
}

.flip7-logo-wrap {
    position: relative;
    width: 200px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fan-cards {
    position: absolute;
    top: -10px;
    width: 140px;
    height: 80px;
}
.fan-card {
    position: absolute;
    width: 40px;
    height: 60px;
    background: var(--surface);
    border: 2px solid var(--text);
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
    left: 50%;
    transform-origin: bottom center;
}
.fan-1 { transform: translateX(-50%) rotate(-24deg); background: var(--primary); }
.fan-2 { transform: translateX(-50%) rotate(-12deg); background: var(--accent); }
.fan-3 { transform: translateX(-50%) rotate(0deg); background: var(--surface); }
.fan-4 { transform: translateX(-50%) rotate(12deg); background: var(--coral); }
.fan-5 { transform: translateX(-50%) rotate(24deg); background: var(--sky-blue); }

.flip7-text-wrap {
    position: relative;
    display: inline-flex;
    align-items: baseline;
    background: var(--surface-hover); /* Cream */
    padding: 8px 16px;
    border: 3px solid var(--primary-dark);
    transform: skewX(-6deg) rotate(-3deg);
    z-index: 2;
    box-shadow: var(--shadow-md);
}

.flip-text {
    font-size: 32px;
    font-weight: 900;
    color: var(--primary-dark);
    letter-spacing: 2px;
    text-shadow: 1px 1px 0px rgba(255,255,255,0.8);
}

.seven-text {
    font-size: 64px;
    font-weight: 900;
    color: var(--accent);
    transform: rotate(5deg) translateY(4px);
    margin-left: 4px;
    text-shadow: 3px 3px 0px var(--primary-dark), -1px -1px 0 var(--primary-dark), 1px -1px 0 var(--primary-dark), -1px 1px 0 var(--primary-dark), 1px 1px 0 var(--primary-dark);
}

.ribbon-banner {
    position: absolute;
    bottom: -15px;
    z-index: 3;
    display: flex;
    justify-content: center;
    align-items: center;
}
.ribbon-body {
    background: var(--surface-hover);
    padding: 6px 16px;
    border: 3px solid var(--primary-dark);
    font-weight: 900;
    color: var(--primary-dark);
    letter-spacing: 2px;
    font-size: 14px;
    z-index: 2;
    position: relative;
}
.ribbon-tail {
    position: absolute;
    width: 24px;
    height: 32px;
    background: #EEDFA3;
    border: 3px solid var(--primary-dark);
    z-index: 1;
    top: 10px;
}
.ribbon-tail.left {
    left: -16px;
    clip-path: polygon(100% 0, 100% 100%, 0 100%, 30% 50%, 0 0);
}
.ribbon-tail.right {
    right: -16px;
    clip-path: polygon(0 0, 0 100%, 100% 100%, 70% 50%, 100% 0);
}

/* ===== ICONS & RESPONSIBILITY ENHANCEMENTS ===== */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--surface);
    border-radius: var(--radius-sm);
}

.input-with-icon .input-icon {
    position: absolute;
    left: 14px;
    color: var(--primary-light);
    pointer-events: none;
    z-index: 1;
}

.input-with-icon .input-field {
    padding-left: 42px;
    text-align: left;
    background: transparent;
}

@media (max-width: 580px) {
    .flip7-logo-wrap {
        transform: scale(0.7);
    }
    .logo-container {
        padding: 12px 0 16px 0;
    }
}
