/* css/transistors.css */

.tool-page-container {
    padding: 2rem 0 6rem;
}

.tool-header {
    text-align: center;
    margin-bottom: 3rem;
}

.tool-header h1 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.tool-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.lookup-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.search-panel {
    text-align: center;
}

.search-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-box input {
    flex: 1;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: var(--bg-base);
    color: var(--text-main);
    font-size: 1.1rem;
    outline: none;
    font-family: inherit;
    transition: border-color 0.3s;
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.popular-searches {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.tag:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* Results */
.results-panel {
    animation: fadeIn 0.5s ease;
    padding: 3rem;
}

.transistor-header {
    text-align: center;
    margin-bottom: 3rem;
}

#resultTitle {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.transistor-polarity {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.transistor-desc {
    color: var(--text-muted);
}

.transistor-visual-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 3rem;
    align-items: center;
}

@media (max-width: 700px) {
    .transistor-visual-layout {
        grid-template-columns: 1fr;
    }
}

.graphic-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.transistor-graphic {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.transistor-body {
    width: 100px;
    height: 70px;
    background: #222;
    border-radius: 50px 50px 0 0; /* TO-92 shape */
    border-bottom: 3px solid #111;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0px 5px 10px rgba(255,255,255,0.1), 0 5px 15px rgba(0,0,0,0.5);
    position: relative;
    z-index: 2;
}

.t-label {
    color: rgba(255,255,255,0.6);
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
    margin-top: 10px;
}

.t-pins {
    display: flex;
    gap: 15px;
    margin-top: -5px;
}

.t-pin {
    width: 8px;
    height: 60px;
    background: linear-gradient(to right, #94a3b8, #cbd5e1, #94a3b8);
    position: relative;
    border-radius: 0 0 2px 2px;
    z-index: 1;
}

.t-pin-num {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Specs Grid */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

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

.spec-item {
    background: rgba(255,255,255,0.03);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

.spec-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.spec-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.equivalents-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

.equivalents-section h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

.equivalents-section p {
    color: var(--text-main);
    line-height: 1.6;
}

/* Loading Spinner */
.loading-container {
    text-align: center;
    padding: 4rem 2rem;
    animation: fadeIn 0.3s ease;
}

.loading-container h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    margin: 0 auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Multiple Results */
.multiple-results {
    text-align: center;
    padding: 3rem;
    animation: fadeIn 0.5s ease;
}

.multiple-results h3 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.multiple-results p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.option-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.option-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.opt-part {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--primary);
}

.opt-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
}

.no-results svg {
    width: 48px;
    height: 48px;
    color: #ef4444;
    margin-bottom: 1rem;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.no-results p {
    color: var(--text-muted);
}
