/* ========================================
   BeatFocus Producer Toolbox
   ======================================== */

/* ── Hero ── */
.toolbox-hero {
    min-height: 50vh;
    display: flex; align-items: center;
    position: relative; padding: 140px 0 60px; overflow: hidden;
}
.toolbox-hero-content {
    text-align: center; max-width: 680px; margin: 0 auto; position: relative; z-index: 2;
}
.back-link {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--text-secondary); text-decoration: none; font-size: 14px; font-weight: 500;
    margin-bottom: 32px; padding: 8px 16px; border-radius: 8px; transition: all 0.2s ease;
}
.back-link:hover { color: var(--text); background: var(--border-light); }
.back-link .material-symbols-rounded { font-size: 18px; }

.toolbox-icon-wrapper {
    width: 80px; height: 80px; display: flex; align-items: center; justify-content: center;
    background: rgba(255,59,48,0.1); border: 1px solid rgba(255,59,48,0.2);
    border-radius: 24px; margin: 0 auto 20px;
}
.toolbox-icon-wrapper .material-symbols-rounded { font-size: 36px; color: var(--primary); }
.toolbox-label { font-size: 13px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--primary); margin-bottom: 12px; }
.toolbox-hero h1 { font-size: 48px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 16px; }
.toolbox-subtitle { font-size: 18px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 28px; }

.toolbox-meta { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.meta-badge {
    display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted);
    background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 20px; padding: 6px 14px;
}
.meta-badge .material-symbols-rounded { font-size: 15px; color: var(--primary); }

.ai-disclaimer {
    display: inline-flex; align-items: flex-start; gap: 10px;
    background: rgba(255,255,255,0.03); border: 1px solid var(--border);
    border-radius: 12px; padding: 14px 18px;
    font-size: 13px; color: var(--text-muted); line-height: 1.6;
    text-align: left; max-width: 520px; margin: 0 auto;
}
.ai-disclaimer .material-symbols-rounded { font-size: 16px; color: var(--primary); flex-shrink: 0; margin-top: 1px; }

/* ── Main ── */
.toolbox-main { padding: 40px 0 80px; }

/* ── Tools Grid ── */
.tools-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 40px; }
@media (max-width: 768px) { .tools-grid { grid-template-columns: 1fr; } }

/* ── Tool Card ── */
.tool-card {
    display: flex; flex-direction: column;
    background: rgba(255,255,255,0.02); border: 1px solid var(--border);
    border-radius: 20px; padding: 28px;
    text-align: left; color: var(--text); cursor: pointer;
    transition: all 0.3s ease; position: relative; overflow: hidden;
}
.tool-card::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 0% 0%, rgba(255,59,48,0.06) 0%, transparent 60%);
    opacity: 0; transition: opacity 0.3s ease;
}
.tool-card:hover { border-color: rgba(255,59,48,0.3); background: rgba(255,255,255,0.04); transform: translateY(-2px); }
.tool-card:hover::before { opacity: 1; }
.tool-card:hover .tool-card-arrow { transform: translateX(4px); color: var(--primary); }
.tool-card:hover .tool-card-icon { background: rgba(255,59,48,0.15); border-color: rgba(255,59,48,0.3); }
.tool-card-icon {
    width: 52px; height: 52px; display: flex; align-items: center; justify-content: center;
    background: rgba(255,59,48,0.08); border: 1px solid rgba(255,59,48,0.15);
    border-radius: 14px; margin-bottom: 20px; transition: all 0.3s ease;
}
.tool-card-icon .material-symbols-rounded { font-size: 24px; color: var(--primary); }
.tool-card-body { flex: 1; }
.tool-card-tag { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--primary); margin-bottom: 10px; }
.tool-card h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 10px; line-height: 1.3; }
.tool-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 16px; }
.tool-card-examples { display: flex; flex-wrap: wrap; gap: 6px; }
.tool-card-examples span { font-size: 12px; color: var(--text-muted); background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 6px; padding: 3px 10px; }
.tool-card-arrow { display: flex; justify-content: flex-end; margin-top: 20px; color: var(--text-muted); transition: all 0.3s ease; }
.tool-card-arrow .material-symbols-rounded { font-size: 20px; }

/* ── Coming Soon ── */
.coming-soon-row { display: flex; justify-content: center; }
.coming-soon-label {
    display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted);
    background: rgba(255,255,255,0.03); border: 1px dashed var(--border); border-radius: 20px; padding: 10px 20px;
}
.coming-soon-label .material-symbols-rounded { font-size: 16px; color: var(--primary); }

/* ── CTA ── */
.toolbox-cta { padding: 0 0 100px; }
.toolbox-cta-box {
    text-align: center; background: rgba(255,59,48,0.04); border: 1px solid rgba(255,59,48,0.15);
    border-radius: 24px; padding: 60px 40px; max-width: 600px; margin: 0 auto;
}
.toolbox-cta-icon {
    width: 60px; height: 60px; display: flex; align-items: center; justify-content: center;
    background: rgba(255,59,48,0.1); border: 1px solid rgba(255,59,48,0.2); border-radius: 18px; margin: 0 auto 24px;
}
.toolbox-cta-icon .material-symbols-rounded { font-size: 28px; color: var(--primary); }
.toolbox-cta-box h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 12px; }
.toolbox-cta-box p { font-size: 15px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 28px; }
.cta-btn {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--primary); color: #fff; text-decoration: none;
    font-size: 15px; font-weight: 600; padding: 14px 28px; border-radius: 14px; transition: all 0.3s ease;
}
.cta-btn:hover { background: #e0352b; transform: translateY(-1px); }
.cta-btn .material-symbols-rounded { font-size: 20px; }
.nav-link.active { color: var(--text); }

/* ══════════════════════════════════════
   TOOL MODALS
══════════════════════════════════════ */
.tool-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    z-index: 1000; opacity: 0; transition: opacity 0.25s ease;
}
.tool-modal-overlay.active { opacity: 1; }

.tool-modal {
    display: none; position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -47%) scale(0.97);
    width: 92%; max-width: 820px;
    max-height: 86vh;
    background: #141414;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 22px;
    z-index: 1001;
    overflow-y: auto; overflow-x: hidden;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.28s cubic-bezier(0.34, 1.3, 0.64, 1);
    flex-direction: column;
}
.tool-modal.active { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.tool-modal::-webkit-scrollbar { width: 4px; }
.tool-modal::-webkit-scrollbar-track { background: transparent; }
.tool-modal::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

/* Header */
.tool-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    position: sticky; top: 0; background: #141414; z-index: 10; border-radius: 22px 22px 0 0;
}
.tool-modal-title { display: flex; align-items: center; gap: 14px; }
.tool-modal-icon {
    width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
    background: rgba(255,59,48,0.1); border: 1px solid rgba(255,59,48,0.2); border-radius: 12px; flex-shrink: 0;
}
.tool-modal-icon .material-symbols-rounded { font-size: 20px; color: var(--primary); }
.tool-modal-tag { font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--primary); margin-bottom: 2px; }
.tool-modal-title h2 { font-size: 17px; font-weight: 700; margin: 0; line-height: 1.2; }
.tool-modal-close {
    width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.09);
    border-radius: 9px; color: var(--text-muted); cursor: pointer; transition: all 0.2s ease; flex-shrink: 0;
}
.tool-modal-close:hover { color: var(--text); background: rgba(255,255,255,0.1); }
.tool-modal-close .material-symbols-rounded { font-size: 17px; }

/* Body */
.tool-modal-body { padding: 20px 24px 24px; }

/* Two-column layout */
.tool-row {
    display: grid; grid-template-columns: 230px 1fr;
    gap: 16px; margin-bottom: 14px; align-items: start;
}
@media (max-width: 580px) { .tool-row { grid-template-columns: 1fr; } }

/* Form */
.tool-form { display: flex; flex-direction: column; gap: 12px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label {
    font-size: 11px; font-weight: 700; color: var(--text-secondary);
    letter-spacing: 0.6px; text-transform: uppercase;
}
.optional { font-weight: 400; color: var(--text-muted); text-transform: none; letter-spacing: 0; font-size: 11px; }

/* ── Select & Input — custom styled ── */
.form-field select,
.form-field input[type="text"] {
    appearance: none;
    -webkit-appearance: none;
    background-color: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    color: #fff;
    font-size: 13px;
    font-family: inherit;
    padding: 9px 36px 9px 12px;
    outline: none;
    width: 100%;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
}
.form-field input[type="text"] {
    padding: 9px 12px;
    background-image: none;
    cursor: text;
}
.form-field select:focus,
.form-field input[type="text"]:focus {
    border-color: rgba(255,59,48,0.5);
    background-color: rgba(255,255,255,0.07);
}
.form-field select option {
    background: #1e1e1e;
    color: #fff;
    padding: 8px;
}

.key-selects { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Semitone */
.semitone-input { display: flex; align-items: center; gap: 6px; }
.semitone-btn {
    width: 36px; height: 36px; min-width: 36px; display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
    border-radius: 9px; color: var(--text-muted); cursor: pointer; transition: all 0.2s ease;
}
.semitone-btn:hover { background: rgba(255,255,255,0.1); color: var(--text); }
.semitone-btn .material-symbols-rounded { font-size: 18px; }
.semitone-input input {
    flex: 1; text-align: center;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
    border-radius: 9px; color: #fff; font-size: 15px; font-weight: 700;
    padding: 8px; outline: none; font-family: inherit;
    background-image: none !important;
    /* Spinner-Pfeile entfernen */
    -moz-appearance: textfield;
    appearance: textfield;
}
.semitone-input input::-webkit-inner-spin-button,
.semitone-input input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Generate Button */
.tool-generate-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--primary); color: #fff; border: none;
    border-radius: 11px; padding: 11px 18px;
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: all 0.2s ease; font-family: inherit; width: 100%; margin-top: 2px;
}
.tool-generate-btn:hover:not(:disabled) { background: #e0352b; transform: translateY(-1px); }
.tool-generate-btn:active:not(:disabled) { transform: translateY(0); }
.tool-generate-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.tool-generate-btn .material-symbols-rounded { font-size: 17px; }
.spin { animation: spin 0.7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Output panel */
.tool-output {
    background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px; padding: 16px; min-height: 240px;
    display: flex; flex-direction: column;
}

/* Placeholder */
.output-placeholder {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 10px;
    color: var(--text-muted); text-align: center;
}
.output-placeholder .material-symbols-rounded { font-size: 30px; opacity: 0.2; }
.output-placeholder p { font-size: 13px; }

/* Loading dots */
.loading-dots { display: flex; gap: 6px; margin-bottom: 4px; }
.loading-dots span {
    width: 7px; height: 7px; border-radius: 50%; background: var(--primary);
    animation: dotPulse 1.2s ease-in-out infinite;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotPulse { 0%,80%,100% { opacity:0.2; transform:scale(0.85); } 40% { opacity:1; transform:scale(1); } }

/* Result list */
.result-list { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.result-item {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
    border-radius: 9px; padding: 9px 11px;
    animation: fadeInUp 0.25s ease both; transition: border-color 0.2s ease;
}
.result-item:hover { border-color: rgba(255,59,48,0.2); }
@keyframes fadeInUp { from { opacity:0; transform:translateY(7px); } to { opacity:1; transform:translateY(0); } }
.result-text { font-size: 13px; font-weight: 500; color: #fff; line-height: 1.4; flex: 1; }

/* Copy button */
.copy-btn {
    background: none; border: none; color: var(--text-muted); cursor: pointer;
    padding: 3px 5px; border-radius: 6px; display: flex; align-items: center;
    transition: all 0.2s ease; flex-shrink: 0;
}
.copy-btn:hover { color: var(--primary); background: rgba(255,59,48,0.08); }
.copy-btn.copied { color: #30d158; }
.copy-btn .material-symbols-rounded { font-size: 15px; }

/* Beat idea */
.idea-card { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.idea-row {
    display: flex; align-items: center; gap: 10px;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
    border-radius: 9px; padding: 8px 11px;
    animation: fadeInUp 0.25s ease both;
}
.idea-label-wrap { display: flex; align-items: center; gap: 5px; min-width: 96px; }
.idea-icon { font-size: 14px !important; color: var(--primary); }
.idea-label { font-size: 10px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--primary); white-space: nowrap; }
.idea-value { font-size: 13px; font-weight: 500; color: #fff; flex: 1; }

/* Transpose result */
.transpose-result {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 6px; padding: 16px 0;
    animation: fadeInUp 0.3s ease both;
}
.transpose-from { font-size: 15px; font-weight: 500; color: var(--text-secondary); }
.transpose-arrow { font-size: 22px !important; color: var(--primary); margin: 2px 0; }
.transpose-to { font-size: 30px; font-weight: 800; color: #fff; letter-spacing: -0.02em; text-align: center; line-height: 1.2; }
.transpose-scale { font-size: 15px; font-weight: 500; color: var(--text-secondary); }
.transpose-info { font-size: 12px; color: var(--text-muted); margin-top: 4px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 6px; padding: 3px 12px; }

/* Disclaimer */
.tool-disclaimer {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: 11px; color: var(--text-muted); line-height: 1.5;
    background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 9px; padding: 10px 12px;
}
.tool-disclaimer .material-symbols-rounded { font-size: 13px; flex-shrink: 0; margin-top: 1px; }

/* Responsive */
@media (max-width: 600px) {
    .toolbox-hero h1 { font-size: 32px; }
    .toolbox-subtitle { font-size: 16px; }
    .toolbox-cta-box { padding: 40px 20px; }
    .tool-modal { width: 97%; max-height: 93vh; border-radius: 18px; }
    .tool-modal-header { padding: 16px 16px 12px; border-radius: 18px 18px 0 0; }
    .tool-modal-body { padding: 16px; }
}

/* Custom Artist Input — slide in */
#tb-custom-artist-field {
    flex-direction: column;
    animation: fadeInUp 0.2s ease both;
}
