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

    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;
    margin-top: 60px;
}

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

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

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

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

.file-info-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

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

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

.preview-section {
    display: flex;
    flex-direction: column;
}

.preview-wrapper {
    position: relative;
    width: 100%;
}

.preview-container {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-container canvas {
    display: block;
    max-width: 100%;
    width: 100%;
    height: auto;
}

.preview-info {
    font-size: 13px;
    color: #6b7280;
    margin-top: 8px;
    text-align: center;
}

.safe-zone-overlay {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 20%;
    pointer-events: none;
    transition: opacity 150ms ease;
}

.safe-zone-overlay.hidden {
    opacity: 0;
}

.safe-zone-indicator {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    background: repeating-linear-gradient(
        45deg,
        rgba(239, 68, 68, 0.15),
        rgba(239, 68, 68, 0.15) 10px,
        rgba(239, 68, 68, 0.25) 10px,
        rgba(239, 68, 68, 0.25) 20px
    );
    border-right: 2px dashed rgba(239, 68, 68, 0.6);
}

.safe-zone-label {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(239, 68, 68, 0.9);
    color: #ffffff;
    font-size: 10px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.safe-zone-toggle {
    margin-top: 12px;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
    user-select: none;
}

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

.toggle-switch {
    width: 40px;
    height: 22px;
    background-color: #374151;
    border-radius: 11px;
    position: relative;
    transition: background-color 150ms ease;
    flex-shrink: 0;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background-color: #9ca3af;
    border-radius: 50%;
    transition: all 150ms ease;
}

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

.toggle-label input[type="checkbox"]:checked + .toggle-switch::after {
    left: 21px;
}

.toggle-label input[type="checkbox"]:disabled + .toggle-switch {
    opacity: 0.5;
    cursor: not-allowed;
}

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

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

.text-field {
    width: 100%;
    background-color: #1a1a1a;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 150ms ease;
}

.text-field:focus {
    outline: none;
    border-color: #3b82f6;
}

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

.select-field {
    width: 100%;
    background-color: #1a1a1a;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 150ms ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.select-field:focus {
    outline: none;
    border-color: #3b82f6;
}

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

input[type="color"] {
    -webkit-appearance: none;
    border: 1px solid #374151;
    border-radius: 6px;
    width: 48px;
    height: 40px;
    cursor: pointer;
    background: none;
    padding: 2px;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.align-buttons {
    display: flex;
    gap: 0;
    border: 1px solid #374151;
    border-radius: 6px;
    overflow: hidden;
    width: fit-content;
}

.align-btn {
    background-color: #1a1a1a;
    border: none;
    color: #9ca3af;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
}

.align-btn:not(:last-child) {
    border-right: 1px solid #374151;
}

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

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

.text-shadow-group {
    padding-top: 8px;
    border-top: 1px solid #374151;
}

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

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

.download-action {
    padding-top: 8px;
}

.download-action .button-primary {
    width: 100%;
}

.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-text {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    padding: 4px 0;
    transition: color 150ms ease;
}

.button-text:hover {
    color: #60a5fa;
}

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

.info-message {
    background-color: #1e3a5f;
    border: 1px solid #3b82f6;
    color: #93c5fd;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
}

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

    .text-section,
    .background-section {
        padding: 16px;
    }

    .align-btn {
        padding: 8px 14px;
        font-size: 13px;
    }

    .safe-zone-label {
        font-size: 9px;
        padding: 3px 6px;
    }
}

@media (max-width: 480px) {
    .align-buttons {
        width: 100%;
    }

    .align-btn {
        flex: 1;
        padding: 8px 12px;
        font-size: 12px;
    }
}