/* Tool-specific styles only - base styles are in tool-layout.css */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #0a0a0a;
    color: #e5e7eb;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #141414;
    border-bottom: 1px solid #374151;
    z-index: 100;
}

    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

    margin-top: 60px;
    padding: 48px 24px;
    text-align: center;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    max-width: 720px;
    margin: 0 auto;
}

.tool-main {
    flex: 1;
    padding: 32px 24px 120px;
}

.tool-container {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group > label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.file-upload-zone {
    background-color: #0a0a0a;
    border: 2px dashed #374151;
    border-radius: 12px;
    padding: 48px 32px;
    text-align: center;
    cursor: pointer;
    transition: all 150ms ease;
    position: relative;
    outline: none;
}

.file-upload-zone.has-error {
    border-color: #dc2626;
    background-color: #7f1d1d;
}

.file-upload-zone.has-file {
    border-style: solid;
    border-color: #374151;
    padding: 24px;
}

.upload-icon {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    opacity: 0.7;
    color: #6b7280;
    letter-spacing: 2px;
}

.upload-primary {
    font-size: 16px;
    font-weight: 400;
    color: #e5e7eb;
    margin-bottom: 4px;
}

.upload-secondary {
    font-size: 14px;
    font-weight: 400;
    color: #9ca3af;
}

.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
}

.file-info-details {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    min-width: 0;
}

.file-name {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
    word-break: break-all;
}

.file-dimensions {
    font-size: 13px;
    color: #9ca3af;
}

.file-size {
    font-size: 13px;
    color: #9ca3af;
}

.button-text {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 150ms ease;
    flex-shrink: 0;
}

.button-text:hover {
    background-color: rgba(239, 68, 68, 0.1);
}

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 24px;
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
}

.settings-title {
    font-size: 18px;
    font-weight: 500;
    color: #d1d5db;
    margin-bottom: 4px;
}

.settings-title-sub {
    font-size: 15px;
    font-weight: 500;
    color: #9ca3af;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.setting-item > label,
.setting-content > label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.setting-note {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.segmented-control {
    display: flex;
    background-color: #1a1a1a;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
}

.segment-btn {
    flex: 1;
    padding: 10px 16px;
    background: none;
    border: none;
    border-radius: 6px;
    color: #9ca3af;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.segment-btn:hover {
    color: #e5e7eb;
}

.segment-btn.active {
    background-color: #3b82f6;
    color: #ffffff;
}

.segment-btn.active .pro-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.segmented-small .segment-btn {
    padding: 8px 12px;
    font-size: 13px;
}

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

.effect-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 8px;
}

.color-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-picker {
    width: 44px;
    height: 44px;
    border: 2px solid #374151;
    border-radius: 8px;
    cursor: pointer;
    background: none;
    padding: 2px;
    -webkit-appearance: none;
    appearance: none;
}

.color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 5px;
}

.color-picker::-moz-color-swatch {
    border: none;
    border-radius: 5px;
}

.color-picker:focus-visible {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.hex-input {
    width: 100px;
    padding: 10px 12px;
    font-family: 'Inter', monospace;
    font-size: 14px;
    text-transform: uppercase;
}

.swatch-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.swatch {
    width: 32px;
    height: 32px;
    border: 2px solid #374151;
    border-radius: 6px;
    cursor: pointer;
    transition: all 150ms ease;
    padding: 0;
}

.swatch:hover {
    transform: scale(1.15);
    border-color: #6b7280;
}

.swatch.active {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4);
}

.slider-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.slider-input-row .slider {
    flex: 1;
}

.number-input {
    width: 72px;
    padding: 8px 10px;
    text-align: center;
    font-size: 14px;
    -moz-appearance: textfield;
}

.number-input::-webkit-inner-spin-button,
.number-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="range"].slider {
    width: 100%;
    height: 4px;
    background-color: #374151;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
    display: block;
}

input[type="range"].slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background-color: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
}

input[type="range"].slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background-color: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

input[type="range"].slider:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.text-input {
    background-color: #141414;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
}

.text-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.text-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.text-input::placeholder {
    color: #6b7280;
}

.gradient-stops {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gradient-stop {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
}

.gradient-stop .color-picker {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.gradient-stop .slider {
    flex: 1;
    min-width: 0;
}

.stop-position-label {
    font-size: 12px;
    font-weight: 500;
    color: #9ca3af;
    width: 36px;
    text-align: right;
    flex-shrink: 0;
}

.stop-remove {
    background: none;
    border: 1px solid #374151;
    color: #6b7280;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 150ms ease;
}

.stop-remove:hover:not(:disabled) {
    color: #ef4444;
    border-color: #ef4444;
}

.stop-remove:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.gradient-preview {
    height: 24px;
    border-radius: 6px;
    border: 1px solid #374151;
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
}

.frame-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.frame-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 8px;
    background-color: #1a1a1a;
    border: 1px solid #374151;
    border-radius: 8px;
    cursor: pointer;
    transition: all 150ms ease;
    font-family: inherit;
    color: #9ca3af;
    font-size: 12px;
    font-weight: 500;
}

.frame-option:hover {
    border-color: #6b7280;
    color: #e5e7eb;
}

.frame-option.active {
    border-color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
    color: #ffffff;
}

.frame-preview {
    width: 48px;
    height: 36px;
    border-radius: 3px;
    position: relative;
}

.frame-preview-polaroid {
    background-color: #e5e7eb;
    border: 3px solid #e5e7eb;
    border-bottom-width: 10px;
}

.frame-preview-polaroid::after {
    content: '';
    position: absolute;
    inset: 3px;
    bottom: 0;
    background-color: #6b7280;
    border-radius: 1px;
}

.frame-preview-filmstrip {
    background-color: #1a1a1a;
    border: 4px solid #333;
    position: relative;
}

.frame-preview-filmstrip::before,
.frame-preview-filmstrip::after {
    content: '';
    position: absolute;
    left: 2px;
    right: 2px;
    height: 2px;
    background: repeating-linear-gradient(90deg, #555 0px, #555 3px, transparent 3px, transparent 6px);
}

.frame-preview-filmstrip::before {
    top: 0;
}

.frame-preview-filmstrip::after {
    bottom: 0;
}

.frame-preview-vintage {
    border: 3px solid #f5f0e8;
}

.frame-preview-vintage::after {
    content: '';
    position: absolute;
    inset: 2px;
    border: 1px solid #3a3a3a;
    border-radius: 1px;
}

.frame-preview-shadowbox {
    background-color: #9ca3af;
    border: 3px solid #9ca3af;
    border-top-color: #d1d5db;
    border-left-color: #d1d5db;
    border-bottom-color: #6b7280;
    border-right-color: #6b7280;
}

.frame-preview-doubleborder {
    background-color: #e5e7eb;
    border: 2px solid #e5e7eb;
    outline: 2px solid #9ca3af;
    outline-offset: 2px;
}

.frame-preview-ornate {
    background-color: #e5e7eb;
    border: 3px solid #e5e7eb;
}

.frame-preview-ornate::before,
.frame-preview-ornate::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-color: #6b7280;
    border-style: solid;
}

.frame-preview-ornate::before {
    top: 2px;
    left: 2px;
    border-width: 2px 0 0 2px;
}

.frame-preview-ornate::after {
    bottom: 2px;
    right: 2px;
    border-width: 0 2px 2px 0;
}

.pro-features-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid #374151;
}

.pro-feature {
    position: relative;
    opacity: 0.6;
}

.pro-feature.unlocked {
    opacity: 1;
}

.pro-badge {
    color: #0a0a0a;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.preview-container {
    position: relative;
    background-color: #0a0a0a;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 16px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image:
        linear-gradient(45deg, #1a1a1a 25%, transparent 25%),
        linear-gradient(-45deg, #1a1a1a 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #1a1a1a 75%),
        linear-gradient(-45deg, transparent 75%, #1a1a1a 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}

.preview-container canvas {
    max-width: 100%;
    max-height: 500px;
    border-radius: 4px;
}

.result-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.result-info .stat-item {
    flex: 1 1 calc(33.333% - 8px);
    min-width: 80px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
    padding: 12px;
    background-color: #1a1a1a;
    border-radius: 6px;
}

.stat-label {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 16px;
    font-weight: 600;
    color: #e5e7eb;
}

.button-primary {
    background-color: #3b82f6;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
    width: 100%;
}

.button-secondary {
    background-color: #1a1a1a;
    color: #e5e7eb;
    border: 1px solid #374151;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
}

.button-small {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 6px;
}

.button-download {
    background-color: #059669;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
    width: 100%;
}

.output-section {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.output-header h3 {
    font-size: 22px;
    font-weight: 600;
    line-height: 28px;
    color: #d1d5db;
}

.render-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 32px;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #374151;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 14px;
    color: #9ca3af;
}

.progress-bar {
    width: 100%;
    max-width: 300px;
    height: 4px;
    background-color: #374151;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #3b82f6;
    border-radius: 2px;
    width: 0%;
    transition: width 200ms ease;
}

.download-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.batch-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.batch-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.batch-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background-color: #1a1a1a;
    border: 1px solid #374151;
    border-radius: 6px;
}

.batch-item-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.batch-item-info {
    flex: 1;
    min-width: 0;
}

.batch-item-name {
    font-size: 13px;
    color: #e5e7eb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.batch-item-size {
    font-size: 12px;
    color: #9ca3af;
}

.batch-item-remove {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    transition: color 150ms ease;
}

.batch-item-remove:hover {
    color: #ef4444;
}

.batch-item-status {
    font-size: 12px;
    font-weight: 500;
}

.batch-item-status.done {
    color: #10b981;
}

.batch-item-status.pending {
    color: #9ca3af;
}

.batch-results {
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-top: 1px solid #374151;
    padding-top: 24px;
}

.batch-results-header h4 {
    font-size: 18px;
    font-weight: 500;
    color: #d1d5db;
}

.batch-results-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.batch-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background-color: #1a1a1a;
    border-radius: 6px;
    gap: 12px;
}

.batch-result-item .batch-item-thumb {
    width: 36px;
    height: 36px;
}

.batch-result-name {
    font-size: 13px;
    color: #e5e7eb;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.batch-result-size {
    font-size: 13px;
    color: #9ca3af;
    flex-shrink: 0;
}

.batch-result-download {
    background: none;
    border: 1px solid #374151;
    color: #10b981;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 150ms ease;
    flex-shrink: 0;
}

.batch-result-download:hover {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
}

.batch-download-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pro-cta-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.pro-cta-text {
    font-size: 14px;
    color: #d1d5db;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 24px;
}

.modal-overlay.modal-hidden {
    display: none;
}

.modal-overlay.modal-visible {
    display: flex;
}

.modal {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 12px;
    padding: 0;
    max-width: 480px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 24px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
}

.modal-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #e5e7eb;
}

.modal-content {
    padding: 24px;
}

.modal-feature-label {
    font-size: 14px;
    color: #9ca3af;
    margin-bottom: 20px;
}

.pro-features-list {
    margin-bottom: 24px;
}

.pro-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}

.feature-check {
    width: 20px;
    height: 20px;
    background-color: #059669;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.feature-text {
    font-size: 15px;
    color: #e5e7eb;
}

.modal-cta {
    width: 100%;
    display: block;
}

.error-message {
    background-color: #7f1d1d;
    border: 1px solid #dc2626;
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
}

.footer {
    background-color: #0a0a0a;
    border-top: 1px solid #374151;
    padding: 32px 24px;
    text-align: center;
    margin-top: auto;
}

.footer p {
    font-size: 14px;
    color: #6b7280;
}

.modal-hidden {
    display: none;
}

@media (max-width: 768px) {
        padding: 32px 16px;
    }

        font-size: 28px;
        line-height: 36px;
    }

        font-size: 14px;
    }

    .tool-main {
        padding: 24px 16px 100px;
    }

    .tool-container {
        gap: 32px;
    }

    .settings-group {
        padding: 16px;
    }

    .output-section {
        padding: 16px;
    }

    .frame-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .segmented-control {
        flex-wrap: wrap;
    }

    .segment-btn {
        padding: 8px 10px;
        font-size: 13px;
    }

    .file-upload-zone {
        padding: 32px 16px;
    }

    .file-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .color-input-row {
        width: 100%;
    }

    .hex-input {
        flex: 1;
    }

    .result-info .stat-item {
        flex: 1 1 calc(50% - 6px);
    }

    .stat-value {
        font-size: 14px;
    }

    .pro-cta-content {
        flex-direction: column;
        gap: 10px;
    }

        padding: 0 16px;
    }

    .preview-container canvas {
        max-height: 350px;
    }

    .gradient-stop {
        flex-wrap: wrap;
    }

    .gradient-stop .slider {
        order: 10;
        width: 100%;
        flex-basis: 100%;
    }
}

@media (max-width: 480px) {
    .result-info .stat-item {
        flex: 1 1 calc(50% - 6px);
    }

    .swatch {
        width: 28px;
        height: 28px;
    }

    .batch-item {
        flex-wrap: wrap;
    }

    .batch-result-item {
        flex-wrap: wrap;
    }
}