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

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

.field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-group > label {
    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;
    transition: border-color 150ms ease, box-shadow 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;
}

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

.style-btn {
    position: relative;
    background-color: #1a1a1a;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 14px 12px;
    cursor: pointer;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 150ms ease;
}

.style-btn:hover {
    background-color: #252525;
    border-color: #4b5563;
}

.style-btn.active {
    background-color: #1e3a8a;
    border-color: #3b82f6;
}

.style-name {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.style-desc {
    font-size: 12px;
    color: #6b7280;
}

.style-btn.active .style-name {
    color: #ffffff;
}

.style-btn.active .style-desc {
    color: #93c5fd;
}

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

.color-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 6px;
    padding: 8px 12px;
    transition: border-color 150ms ease;
}

.color-picker-wrapper:focus-within {
    border-color: #3b82f6;
}

.color-input {
    -webkit-appearance: none;
    appearance: none;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: none;
    padding: 0;
}

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

.color-input::-webkit-color-swatch {
    border: 1px solid #4b5563;
    border-radius: 4px;
}

.color-input::-moz-color-swatch {
    border: 1px solid #4b5563;
    border-radius: 4px;
}

.color-value {
    font-size: 13px;
    font-family: 'Space Mono', monospace;
    color: #9ca3af;
}

.color-presets {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

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

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

.preset-btn:hover:not(:disabled) {
    background-color: #374151;
}

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

.preset-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.output-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.preview-container {
    background-color: #0a0a0a;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

.preview-container canvas {
    display: block;
    border-radius: 4px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 1px 4px rgba(0, 0, 0, 0.2);
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.zoom-controls > label {
    font-size: 14px;
    font-weight: 500;
    color: #9ca3af;
}

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

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

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

.card-dimensions {
    font-size: 13px;
    color: #6b7280;
    margin-left: auto;
}

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

.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%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.qr-info {
    padding: 12px 16px;
    background-color: #1a1a1a;
    border-radius: 6px;
    border-left: 3px solid #3b82f6;
}

.qr-info p {
    font-size: 14px;
    color: #9ca3af;
    margin: 0;
}

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

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

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

    .color-grid {
        grid-template-columns: 1fr;
    }

    .output-section {
        padding: 16px;
    }

    .preview-container {
        padding: 16px;
    }

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

    .zoom-controls {
        flex-wrap: wrap;
    }

    .presets-row {
        gap: 6px;
    }

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

        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    .style-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}