.text-gradient-teal {
    background: var(--grad-teal);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.tool-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: calc(var(--nav-height) + 2rem) 2rem 4rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    transition: var(--transition-smooth);
}

.back-link:hover {
    color: var(--accent-teal);
    transform: translateX(-4px);
}

.back-link svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    transform: rotate(180deg);
}

.tool-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

@media (max-width: 992px) {
    .tool-grid-layout {
        grid-template-columns: 1fr;
    }
}

.tool-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.tool-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--grad-teal);
    opacity: 0.7;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1rem;
}

.panel-title {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.panel-title svg {
    width: 20px;
    height: 20px;
    color: var(--accent-teal);
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .tool-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .tool-panel {
        padding: 1.25rem;
    }
}

/* Dropzone Upload Box */
.dropzone {
    border: 2px dashed rgba(20, 184, 166, 0.3);
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.3);
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.dropzone:hover, .dropzone.dragover {
    border-color: var(--accent-teal);
    background: rgba(20, 184, 166, 0.05);
    box-shadow: 0 0 20px rgba(20, 184, 166, 0.1);
}

.dropzone-icon {
    width: 48px;
    height: 48px;
    color: var(--accent-teal);
    opacity: 0.8;
    transition: var(--transition-smooth);
}

.dropzone:hover .dropzone-icon {
    transform: translateY(-4px);
    opacity: 1;
}

.dropzone-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
}

.dropzone-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Settings Block */
.settings-group {
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
}

.settings-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent-teal);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.range-slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.range-slider {
    flex-grow: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-teal);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(20, 184, 166, 0.5);
    transition: var(--transition-smooth);
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.range-val {
    font-weight: 700;
    font-family: var(--font-mono);
    color: white;
    min-width: 3.5rem;
    text-align: right;
    font-size: 1.1rem;
}

.dimensions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

/* Image Preview Dashboard */
.preview-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.preview-box {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.preview-box-header {
    background: rgba(255, 255, 255, 0.02);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-box-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.preview-box-badge {
    background: rgba(20, 184, 166, 0.1);
    color: var(--accent-teal);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.preview-image-wrapper {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    max-height: 360px;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.8) 0%, rgba(2, 6, 23, 0.9) 100%);
    position: relative;
}

.preview-image-wrapper img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    background: repeating-conic-gradient(rgba(0,0,0,0.2) 0% 25%, rgba(255,255,255,0.05) 0% 50%) 50% / 20px 20px;
}

.preview-stats-row {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-lbl {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.stat-val {
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
    font-family: var(--font-mono);
}

/* Savings Badge Widget */
.savings-widget {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.15) 0%, rgba(99, 102, 241, 0.15) 100%);
    border: 1px solid rgba(20, 184, 166, 0.25);
    margin-bottom: 1.5rem;
}

.savings-pct {
    font-size: 2.2rem;
    font-weight: 900;
    color: #2dd4bf;
    font-family: var(--font-mono);
    text-shadow: 0 0 15px rgba(45, 212, 191, 0.4);
}

.savings-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.savings-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
}

.savings-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Mobile Switch Navigation Tabs */
.mobile-tabs-container {
    display: none;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 0.35rem;
    margin-bottom: 1.5rem;
    gap: 0.35rem;
}

.mobile-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.6rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-tab-btn.active {
    background: rgba(20, 184, 166, 0.1);
    color: white;
    box-shadow: inset 0 0 10px rgba(20, 184, 166, 0.1);
}

@media (max-width: 992px) {
    .mobile-tabs-container {
        display: flex;
    }
    .tool-panel {
        display: none;
    }
    .active-panel {
        display: flex !important;
    }
}

/* Buttons & Forms Styling */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    outline: none;
    text-decoration: none;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--grad-teal);
    color: white;
    box-shadow: var(--glow-teal);
}

.btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--text-secondary);
    transform: translateY(-1px);
}

.form-select {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-family: var(--font-primary);
    font-weight: 600;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border-radius: var(--radius-sm);
    outline: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='white'><path d='M7 10l5 5 5-5H7z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 20px;
}

.form-select:focus {
    border-color: var(--accent-teal);
    box-shadow: 0 0 10px rgba(20, 184, 166, 0.2);
}

.form-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
    display: block;
    font-weight: 500;
}

.form-control {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 0.6rem 0.8rem;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition-smooth);
}

.form-control:focus {
    border-color: var(--accent-teal);
    box-shadow: 0 0 10px rgba(20, 184, 166, 0.15);
}
