/* Psychology Tool Interface */
.psychology-tool-interface {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2rem;
}

.tool-grid {
    display: grid;
    grid-template-columns: minmax(280px, 380px) 1fr;
    gap: 2rem;
    align-items: start;
}

.tool-panel {
    background: #ffffff;
    border: 1px solid #e6e8ef;
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
}

.tool-panel-input {
    position: sticky;
    top: 1rem;
}

.panel-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.panel-kicker {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #667eea;
}

.panel-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.panel-subtitle {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0;
}

.input-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.picker-stack {
    display: grid;
    gap: 1.5rem;
}

.swatch-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1rem;
}

.swatch-preview {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.color-picker-input {
    width: 72px;
    height: 72px;
    border: none;
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    background: transparent;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
}

.field-group {
    display: grid;
    gap: 0.5rem;
}

.input-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
}

.hex-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hex-input-wrapper:focus-within {
    border-color: #94a3ff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.16);
}

.hex-prefix {
    font-size: 1rem;
    font-weight: 700;
    color: #64748b;
}

.hex-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    text-transform: uppercase;
    outline: none;
}

.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.5rem;
    border-radius: 12px;
    border: none;
    background: #4f46e5;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.2);
}

.primary-button:hover {
    background: #4338ca;
    transform: translateY(-1px);
}

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

.action-row {
    display: grid;
    gap: 0.5rem;
}

.action-hint {
    font-size: 0.85rem;
    color: #94a3b8;
    margin: 0;
}

.quick-picks {
    margin-top: 1.5rem;
    display: grid;
    gap: 0.75rem;
}

.quick-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
}

.quick-colors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(42px, 1fr));
    gap: 0.6rem;
}

.quick-color-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px #e2e8f0;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.quick-color-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 0 1px #c7d2fe, 0 8px 16px rgba(79, 70, 229, 0.18);
}

.tool-panel-results {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

/* Empty state before first analysis */
.results-empty .results-swatch {
    background: #e2e8f0;
}

.results-empty .insight-text {
    color: #94a3b8;
}

.empty-placeholder {
    grid-column: 1 / -1;
    font-size: 0.9rem;
    color: #94a3b8;
    text-align: center;
    margin: 0;
    padding: 1rem;
}

.results-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.results-swatch {
    width: 96px;
    height: 96px;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

.results-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    margin: 0 0 0.35rem 0;
}

.results-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.35rem 0;
}

.results-hex {
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #4f46e5;
    background: #eef2ff;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    margin: 0;
}

.insight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.insight-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.25rem;
    display: grid;
    gap: 0.75rem;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.insight-top {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.insight-icon {
    font-size: 1.5rem;
}

.insight-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.insight-text {
    font-size: 0.92rem;
    color: #475569;
    line-height: 1.6;
    margin: 0;
}

.emotion-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.emotion-tag {
    background: #eef2ff;
    color: #4f46e5;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    border: 1px solid #c7d2fe;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.detail-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 1.25rem;
    display: grid;
    gap: 1rem;align-items: start;
    align-content: start;
}

.detail-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.detail-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0.25rem 0 0 0;
}

.applications-grid,
.combinations-grid,
.cultural-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.application-item,
.combination-item,
.cultural-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1rem;
    text-align: left;
    display: grid;
    gap: 0.35rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.combination-item {
    cursor: pointer;
}

.application-item:hover,
.combination-item:hover,
.cultural-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

.application-icon {
    font-size: 1.6rem;
}

.application-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.application-desc {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
}

.combination-colors {
    display: flex;
    height: 44px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05);
}

.combination-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0.4rem 0 0 0;
}

.combination-hint {
    font-size: 0.75rem;
    color: #94a3b8;
    margin: 0;
}

.cultural-region {
    font-size: 0.95rem;
    font-weight: 700;
    color: #4f46e5;
    margin: 0;
}

.cultural-meaning {
    font-size: 0.85rem;
    color: #475569;
    margin: 0;
    line-height: 1.5;
}

.tips-panel {
    padding: 1.75rem;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.tip-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.25rem;
    display: grid;
    gap: 0.5rem;
}

.tip-icon {
    font-size: 1.6rem;
}

.tip-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.tip-text {
    font-size: 0.88rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    padding: 0.85rem 1.25rem;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1000;
    pointer-events: none;
}

.toast-notification.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

@media (max-width: 1024px) {
    .tool-grid {
        grid-template-columns: 1fr;
    }

    .tool-panel-input {
        position: static;
    }
}

@media (max-width: 768px) {
    .tool-panel {
        padding: 1.5rem;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .results-swatch {
        width: 88px;
        height: 88px;
    }

    .quick-color-btn {
        width: 40px;
        height: 40px;
    }

    .toast-notification {
        right: 1rem;
        left: 1rem;
    }
}
