/* Tool Hero Section - Required by tool-page-structure.mdc */
.tool-hero {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.hero-text {
    flex: 1;
    min-width: 260px;
}

.hero-text h1 {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 760px;
    margin-bottom: 1rem;
    margin-top: 0;
}

@media (max-width: 767px) {
    .hero-text h1 {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }
    
    .hero-subtitle {
        font-size: clamp(1rem, 3vw, 1.125rem);
    }
}

/* Color Harmony Creator Tool Styles */
.harmony-creator-tool {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.tool-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    transition: box-shadow 0.2s ease;
}

.tool-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.card-header {
    margin-bottom: 1.5rem;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.card-description {
    font-size: 0.9375rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

/* Two Column Layout */
.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
    position: relative;
}

.two-column-layout::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #e5e7eb;
    transform: translateX(-50%);
}

.column-left,
.column-right {
    display: flex;
    flex-direction: column;
}

.column-header {
    margin-bottom: 1.5rem;
}

.column-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.375rem 0;
    line-height: 1.3;
}

.column-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

/* Color Selection Area */
.color-selection-area {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
}

.color-picker-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.color-picker {
    width: 80px;
    height: 80px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.color-picker:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
    border: none;
    border-radius: 50%;
}

.color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

.color-display {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: #667eea;
}

.color-inputs {
    width: 100%;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.input-wrapper:focus-within {
    border-color: #667eea;
    background: #ffffff;
}

.input-prefix {
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280;
    margin-right: 0.5rem;
}

.text-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    outline: none;
    
    letter-spacing: 0.05em;
}

.text-input::placeholder {
    color: #9ca3af;
}

/* Harmony Types Grid */
.harmony-types-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.column-right .harmony-types-grid {
    grid-template-columns: repeat(2, 1fr);
}

.harmony-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1rem;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.harmony-type-card:hover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.15);
}

.harmony-type-card.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.harmony-icon-wrapper {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.harmony-icon {
    width: 100%;
    height: 100%;
    stroke-width: 2;
}

.harmony-type-card.active .harmony-icon {
    stroke: #ffffff;
}

.harmony-type-card:not(.active) .harmony-icon {
    stroke: #667eea;
}

.harmony-type-name {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.2;
}

.harmony-type-desc {
    font-size: 0.8125rem;
    opacity: 0.8;
    line-height: 1.3;
}

/* Adjustments */
.adjustments-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.slider-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #374151;
}

.slider-value {
    font-weight: 600;
    color: #667eea;
    
}

.range-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(102, 126, 234, 0.4);
}

.range-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.range-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(102, 126, 234, 0.4);
}

/* Generate Button */
.generate-button {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: all 0.2s ease;
}

.generate-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.generate-button:active {
    transform: translateY(0);
}

.button-icon {
    font-size: 1.25rem;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.action-button {
    padding: 0.625rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
}

.action-button.secondary {
    background: #f9fafb;
    color: #374151;
}

.action-button.secondary:hover {
    border-color: #667eea;
    background: #f0f4ff;
    color: #667eea;
}

.action-button.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-color: transparent;
}

.action-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

/* Palette Grid */
.palette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.color-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.color-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.color-swatch {
    width: 100%;
    height: 120px;
    display: block;
}

.color-info {
    padding: 1rem;
    text-align: center;
}

.color-hex {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    
    margin-bottom: 0.25rem;
}

.color-rgb {
    font-size: 0.75rem;
    color: #6b7280;
    
}

/* Preview Grid */
.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.preview-card {
    border-radius: 12px;
    padding: 2rem;
    color: #ffffff;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.preview-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.preview-desc {
    font-size: 0.875rem;
    opacity: 0.9;
    margin: 0;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #111827;
    color: #ffffff;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transform: translateX(calc(100% + 24px));
    transition: transform 0.3s ease;
    max-width: 320px;
}

.toast.show {
    transform: translateX(0);
}

#toastMessage {
    font-size: 0.9375rem;
    line-height: 1.5;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .harmony-creator-tool {
        gap: 1rem;
    }

    .tool-card {
        padding: 1.25rem;
        border-radius: 12px;
    }

    .card-title {
        font-size: 1.25rem;
    }

    .two-column-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .two-column-layout::before {
        display: none;
    }

    .column-header {
        margin-bottom: 1.25rem;
    }

    .column-title {
        font-size: 1rem;
    }

    .harmony-types-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .column-right .harmony-types-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .harmony-type-card {
        padding: 0.875rem 0.625rem;
    }

    .harmony-icon-wrapper {
        width: 36px;
        height: 36px;
    }

    .harmony-type-name {
        font-size: 0.8125rem;
    }

    .harmony-type-desc {
        font-size: 0.6875rem;
    }

    .harmony-icon-wrapper {
        width: 40px;
        height: 40px;
    }

    .harmony-type-name {
        font-size: 0.875rem;
    }

    .harmony-type-desc {
        font-size: 0.75rem;
    }

    .color-display {
        width: 100px;
        height: 100px;
    }

    .color-picker {
        width: 70px;
        height: 70px;
    }

    .palette-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

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

    .action-buttons {
        width: 100%;
        justify-content: flex-start;
    }

    .action-button {
        flex: 1;
        min-width: auto;
    }

    .header-row {
        flex-direction: column;
    }

    .toast {
        bottom: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
        transform: translateY(calc(100% + 16px));
    }

    .toast.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .harmony-types-grid {
        grid-template-columns: 1fr;
    }

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

    .color-swatch {
        height: 100px;
    }
}
