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

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

.feature-description {
    font-size: 14px;
    color: #9ca3af;
    margin-top: 4px;
}

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

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

.upload-limit {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    margin-top: 8px;
}

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

.image-count-text {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.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;
    width: 100%;
    transition: border-color 150ms ease;
}

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

textarea.text-input {
    resize: vertical;
    min-height: 60px;
}

.username-input-wrapper {
    display: flex;
    align-items: center;
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 150ms ease;
}

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

.username-prefix {
    font-size: 15px;
    color: #6b7280;
    padding: 12px 0 12px 16px;
    flex-shrink: 0;
}

.username-input-wrapper .text-input {
    border: none;
    background: transparent;
    padding-left: 4px;
}

.username-input-wrapper .text-input:focus {
    box-shadow: none;
}

label.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #e5e7eb;
}

label.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 4px;
    position: relative;
    transition: all 150ms ease;
    flex-shrink: 0;
}

label.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

label.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 6px;
    width: 4px;
    height: 8px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

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

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

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

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

.split-upload-zone:hover,
.split-upload-zone:focus-visible {
    border-color: #3b82f6;
    background-color: #1e3a8a;
}

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

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

.split-count-options {
    display: flex;
    gap: 8px;
}

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

.split-count-btn:hover {
    background-color: #374151;
}

.split-count-btn.active {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

.split-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(30%, 1fr));
    gap: 2px;
    background-color: #0a0a0a;
    border: 1px solid #374151;
    border-radius: 6px;
    overflow: hidden;
}

.split-preview-tile {
    aspect-ratio: 1;
    background-color: #1a1a1a;
    overflow: hidden;
}

.split-preview-tile img,
.split-preview-tile canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

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

.arrangement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(30%, 1fr));
    gap: 4px;
}

.grid-cell {
    position: relative;
    aspect-ratio: 1;
    background-color: #141414;
    border: 2px dashed #374151;
    border-radius: 4px;
    overflow: hidden;
    cursor: grab;
    transition: border-color 150ms ease, opacity 150ms ease;
}

.grid-cell:active {
    cursor: grabbing;
}

.grid-cell.has-image {
    border-style: solid;
    border-color: transparent;
}

.grid-cell img,
.grid-cell canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.grid-cell.dragging {
    opacity: 0.4;
}

.grid-cell.drag-over {
    border: 2px solid #3b82f6;
}

.grid-cell-number {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 24px;
    height: 24px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 150ms ease;
    pointer-events: none;
}

.grid-cell:hover .grid-cell-number {
    opacity: 1;
}

.grid-cell-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #e5e7eb;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 150ms ease, background-color 150ms ease;
}

.grid-cell:hover .grid-cell-remove {
    opacity: 1;
}

.grid-cell-remove:hover {
    background-color: rgba(220, 38, 38, 0.8);
    color: #ffffff;
}

.grid-cell-schedule {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px 6px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    pointer-events: none;
}

.grid-cell-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #374151;
    font-size: 24px;
    font-weight: 300;
}

.touch-drag-clone {
    position: fixed;
    z-index: 1000;
    pointer-events: none;
    opacity: 0.85;
    border: 2px solid #3b82f6;
    border-radius: 4px;
    overflow: hidden;
}

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

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

.frequency-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

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

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

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

.save-load-actions {
    display: flex;
    gap: 12px;
}

.save-load-actions .button-secondary {
    flex: 1;
}

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

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

.mockup-frame {
    background-color: #0a0a0a;
    border: 2px solid #374151;
    border-radius: 24px;
    padding: 8px;
    max-width: 375px;
    margin: 0 auto;
    width: 100%;
}

.mockup-frame canvas {
    width: 100%;
    display: block;
    border-radius: 16px;
}

.profile-customization {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-stats-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(30%, 1fr));
    gap: 12px;
}

.profile-stats-inputs .input-group {
    gap: 6px;
}

.profile-stats-inputs .text-input {
    padding: 10px 12px;
    font-size: 14px;
}

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

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

.button-small {
    padding: 8px 16px;
    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%;
}

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

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

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

    .pro-feature-block {
        padding: 16px;
    }

    .output-section {
        padding: 16px;
    }

    .mockup-frame {
        max-width: 100%;
    }

    .frequency-options {
        flex-direction: column;
    }

    .frequency-btn {
        width: 100%;
    }

    .save-load-actions {
        flex-direction: column;
    }

    .profile-stats-inputs {
        grid-template-columns: 1fr;
    }

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

        padding: 0 16px;
    }

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

    .split-count-options {
        flex-direction: column;
    }

    .split-count-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .arrangement-grid {
        gap: 2px;
    }

    .grid-cell-number {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }

    .grid-cell-remove {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }

    .image-count-bar {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
        text-align: center;
    }
}