/* 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: 16px;
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
}

.file-info-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: center;
    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-small {
    padding: 6px 14px;
    font-size: 13px;
}

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

.success-message {
    background-color: #064e3b;
    border: 1px solid #059669;
    color: #6ee7b7;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
}

.canvas-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.canvas-container {
    position: relative;
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    overflow: hidden;
    line-height: 0;
}

.canvas-container canvas {
    display: block;
    width: 100%;
    cursor: crosshair;
}

.canvas-hint {
    font-size: 14px;
    color: #9ca3af;
    text-align: center;
}

.magnifier {
    position: absolute;
    width: 132px;
    height: 132px;
    border: 3px solid #ffffff;
    border-radius: 4px;
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.magnifier canvas {
    display: block;
    width: 132px;
    height: 132px;
    image-rendering: pixelated;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.section-title {
    font-size: 18px;
    font-weight: 500;
    color: #d1d5db;
}

.picked-color-section {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 24px;
}

.picked-color-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.color-swatch-large {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 2px solid #374151;
}

.color-values {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.color-value-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background-color: #1a1a1a;
    border-radius: 6px;
    position: relative;
}

.color-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 32px;
    flex-shrink: 0;
}

.color-value {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    color: #e5e7eb;
}

.mono {
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
}

.copy-btn {
    background-color: #374151;
    border: none;
    color: #d1d5db;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 150ms ease;
    flex-shrink: 0;
}

.copy-btn:hover {
    background-color: #4b5563;
}

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

.copied-tooltip {
    position: absolute;
    right: 14px;
    top: -28px;
    background-color: #10b981;
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 4px;
    pointer-events: none;
    animation: fadeInOut 1.5s ease forwards;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(4px); }
    15% { opacity: 1; transform: translateY(0); }
    70% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-4px); }
}

.color-history-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.color-history-swatch {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 150ms ease;
    flex-shrink: 0;
}

.color-history-swatch:hover {
    border-color: #ffffff;
    transform: scale(1.1);
}

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

.harmony-section {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 24px;
}

.harmony-type-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.harmony-type-btn {
    background-color: #1a1a1a;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
}

.harmony-type-btn:hover {
    background-color: #374151;
}

.harmony-type-btn.active {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

.harmony-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.harmony-swatch-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: transform 150ms ease;
}

.harmony-swatch-item:hover {
    transform: scale(1.05);
}

.harmony-swatch {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    border: 2px solid #374151;
}

.harmony-swatch-label {
    font-size: 11px;
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
    color: #9ca3af;
}

.palette-section {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 24px;
}

.palette-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
}

.palette-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.palette-swatch-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: transform 150ms ease;
}

.palette-swatch-item:hover {
    transform: scale(1.05);
}

.palette-swatch {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    border: 2px solid #374151;
}

.palette-swatch-hex {
    font-size: 11px;
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
    color: #9ca3af;
}

.palette-swatch-percent {
    font-size: 11px;
    color: #6b7280;
}

.palette-export-actions {
    display: flex;
    gap: 12px;
}

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

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

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

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

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

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

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

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

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

.progress-bar {
    width: 100%;
    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;
}

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

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

.batch-result-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background-color: #1a1a1a;
    border-radius: 6px;
}

.batch-result-name {
    font-size: 13px;
    font-weight: 500;
    color: #e5e7eb;
}

.batch-result-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.batch-result-swatch {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: 1px solid #374151;
}

.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;
}

.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;
}

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

.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;
}

.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;
}

.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: 15px;
    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;
}

.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;
}

@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;
    }

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

    .picked-color-section {
        padding: 16px;
    }

    .harmony-section {
        padding: 16px;
    }

    .palette-section {
        padding: 16px;
    }

    .batch-section {
        padding: 16px;
    }

    .palette-export-actions {
        flex-direction: column;
    }

    .harmony-type-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

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

        padding: 0 16px;
    }

    .button-primary,
    .button-secondary {
        width: 100%;
    }

    .file-info {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .palette-swatch {
        width: 48px;
        height: 48px;
    }

    .harmony-swatch {
        width: 44px;
        height: 44px;
    }

    .color-swatch-large {
        width: 64px;
        height: 64px;
    }

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