/* 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;
}

.category-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.category-tab {
    background-color: #1a1a1a;
    border: 1px solid #374151;
    border-bottom: 2px solid transparent;
    color: #9ca3af;
    padding: 10px 16px;
    border-radius: 6px 6px 0 0;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.category-tab:hover {
    color: #e5e7eb;
    background-color: #252525;
}

.category-tab.active {
    background-color: #141414;
    color: #ffffff;
    border-bottom-color: #667eea;
}

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

.template-card {
    background-color: #141414;
    border: 2px solid #2a2a2a;
    border-radius: 8px;
    cursor: pointer;
    transition: all 150ms ease;
    overflow: hidden;
    position: relative;
}

.template-card:hover {
    border-color: #374151;
    transform: scale(1.02);
}

.template-card.selected {
    border-color: #667eea;
}

.template-card canvas {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: block;
}

.template-card-name {
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 500;
    color: #d1d5db;
    text-align: center;
    border-top: 1px solid #2a2a2a;
}

.template-card .pro-badge {
    position: absolute;
    top: 8px;
    right: 8px;
}

.pro-badge {
    color: #0a0a0a;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.platform-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.platform-btn {
    background-color: #1a1a1a;
    border: 1px solid #374151;
    color: #9ca3af;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.platform-btn:hover {
    background-color: #252525;
    color: #e5e7eb;
}

.platform-btn.active {
    background-color: #667eea;
    border-color: #667eea;
    color: #ffffff;
}

.platform-btn.active .pro-badge {
    display: none;
}

.text-input {
    background-color: #111111;
    border: 1px solid #374151;
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
    width: 100%;
}

.text-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15);
}

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

.textarea-input {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

.input-with-count {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.char-count {
    font-size: 12px;
    color: #6b7280;
    text-align: right;
}

.color-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background-color: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
}

.color-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.color-label {
    font-size: 13px;
    font-weight: 500;
    color: #d1d5db;
    min-width: 80px;
}

.color-picker-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

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

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

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

.hex-input {
    width: 100px;
    padding: 8px 12px;
    font-size: 13px;
    font-family: 'Space Grotesk', monospace;
    text-transform: uppercase;
}

.font-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background-color: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
}

.font-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.font-label {
    font-size: 13px;
    font-weight: 500;
    color: #d1d5db;
    min-width: 100px;
}

.select-input {
    background-color: #111111;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 10px 36px 10px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    flex: 1;
    min-width: 0;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.select-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15);
}

.select-input option {
    background-color: #1a1a1a;
}

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

.logo-upload-zone:hover,
.logo-upload-zone:focus-visible {
    border-color: #667eea;
    background-color: rgba(102, 126, 234, 0.05);
}

.logo-upload-zone.drag-active {
    border-color: #667eea;
    background-color: rgba(102, 126, 234, 0.08);
}

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

.upload-secondary {
    font-size: 13px;
    font-weight: 400;
    color: #6b7280;
}

.logo-preview {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background-color: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
}

.logo-thumbnail-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-thumbnail-container img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 4px;
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    padding: 4px;
}

.logo-remove-btn {
    background-color: #1a1a1a;
    border: 1px solid #374151;
    color: #ef4444;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
    margin-left: auto;
}

.logo-remove-btn:hover {
    background-color: #7f1d1d;
    border-color: #ef4444;
}

.logo-option-label {
    font-size: 13px;
    font-weight: 500;
    color: #9ca3af;
}

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

.logo-position-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 6px;
}

.position-btn {
    background-color: #1a1a1a;
    border: 1px solid #374151;
    color: #9ca3af;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
    text-align: center;
}

.position-btn:hover {
    background-color: #252525;
    color: #e5e7eb;
}

.position-btn.active {
    background-color: #667eea;
    border-color: #667eea;
    color: #ffffff;
}

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

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: 18px;
    height: 18px;
    background-color: #667eea;
    border-radius: 50%;
    cursor: pointer;
}

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

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

.pro-feature-block {
    padding: 16px;
    background-color: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
}

.pro-feature-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.pro-feature-header label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.brand-kit-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.brand-kit-info {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #2a2a2a;
}

.brand-kit-swatches {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.brand-kit-swatch {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid #374151;
}

.brand-kit-fonts {
    font-size: 12px;
    color: #6b7280;
}

.button-primary {
    background-color: #667eea;
    color: #ffffff;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    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: 10px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
}

.button-download {
    background-color: #059669;
    color: #ffffff;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    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;
}

.canvas-preview-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 16px;
    overflow: hidden;
}

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

.output-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.scale-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.scale-selector label {
    font-size: 13px;
    font-weight: 500;
    color: #9ca3af;
}

.scale-btn {
    background-color: #1a1a1a;
    border: 1px solid #374151;
    color: #9ca3af;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
}

.scale-btn:hover {
    background-color: #252525;
    color: #e5e7eb;
}

.scale-btn.active {
    background-color: #667eea;
    border-color: #667eea;
    color: #ffffff;
}

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

.batch-section {
    padding: 20px;
    background-color: #111111;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
}

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

.batch-mode-selector {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.batch-mode-btn {
    background-color: #1a1a1a;
    border: 1px solid #374151;
    color: #9ca3af;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
}

.batch-mode-btn:hover {
    background-color: #252525;
    color: #e5e7eb;
}

.batch-mode-btn.active {
    background-color: #667eea;
    border-color: #667eea;
    color: #ffffff;
}

.batch-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 0;
}

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

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

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

.batch-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #2a2a2a;
}

.batch-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.batch-result-card {
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    overflow: hidden;
}

.batch-result-card canvas,
.batch-result-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    display: block;
    background-color: #0a0a0a;
}

.batch-result-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-top: 1px solid #2a2a2a;
}

.batch-result-label {
    font-size: 11px;
    font-weight: 500;
    color: #9ca3af;
}

.batch-result-download {
    background: none;
    border: none;
    color: #667eea;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    padding: 2px 4px;
    transition: color 150ms ease;
}

.batch-result-download:hover {
    color: #5a6fd6;
}

.pro-cta-content {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    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;
    transition: color 150ms ease;
}

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

.modal-content {
    padding: 24px;
}

.modal-feature-context {
    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: 10px 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: 14px;
    color: #e5e7eb;
}

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

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

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

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

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

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

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

    .category-tabs {
        gap: 4px;
    }

    .category-tab {
        padding: 8px 12px;
        font-size: 13px;
    }

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

    .platform-selector {
        gap: 6px;
    }

    .platform-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    .color-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .font-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .select-input {
        width: 100%;
    }

    .output-section {
        padding: 16px;
    }

    .canvas-preview-container {
        padding: 8px;
    }

    .batch-results-grid {
        grid-template-columns: 1fr;
    }

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

        padding: 0 16px;
    }

    .brand-kit-controls {
        flex-direction: column;
    }

    .brand-kit-controls .button-secondary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .category-tab {
        padding: 6px 8px;
        font-size: 12px;
    }

    .template-gallery {
        gap: 6px;
    }

    .template-card-name {
        font-size: 11px;
        padding: 6px 8px;
    }

    .batch-mode-selector {
        flex-direction: column;
    }

    .batch-mode-btn {
        width: 100%;
        text-align: center;
    }
}