/* Quantum Technology Stack Heat Map Styles */

/* Base Container */
.tech-stack-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #ffffff;
    padding: 2rem;
    font-family: 'SUSE Mono', 'Courier New', monospace;
}

/* Header */
.tech-stack-header {
    text-align: center;
    margin-bottom: 3rem;
}

.tech-stack-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.tech-stack-header h1 a {
    color: #64ffda;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tech-stack-header h1 a:hover {
    text-shadow: 0 0 20px #64ffda;
}

.page-title h2 {
    font-size: 2rem;
    margin: 1rem 0;
    background: linear-gradient(90deg, #00c4e8, #ff8001);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.1rem;
    color: #b0c4de;
    margin-bottom: 1rem;
}

.breadcrumb {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #888;
}

.breadcrumb a {
    color: #64ffda;
    text-decoration: none;
}

/* Technology Info Panel */
.tech-info-panel {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(100, 255, 218, 0.3);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.tech-info-panel h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #64ffda;
    text-align: center;
}

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

.tech-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tech-card:hover {
    transform: translateY(-5px);
    border-color: #64ffda;
    box-shadow: 0 10px 30px rgba(100, 255, 218, 0.3);
}

.tech-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.tech-card h4 {
    font-size: 1.2rem;
    margin: 0.5rem 0;
    color: #64ffda;
}

.tech-card p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #b0c4de;
}

/* Controls */
.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    align-items: flex-end;
}

.control-group {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group label {
    font-size: 0.9rem;
    color: #64ffda;
    font-weight: 600;
}

.controls select,
.controls button {
    padding: 0.75rem 1rem;
    background: rgba(26, 26, 46, 0.8);
    border: 1px solid #64ffda;
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.controls select:hover,
.controls button:hover {
    background: rgba(100, 255, 218, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 255, 218, 0.3);
}

.controls select:focus {
    outline: none;
    border-color: #ff8001;
    box-shadow: 0 0 0 3px rgba(255, 128, 1, 0.2);
}

.reset-btn {
    background: linear-gradient(135deg, #ff6b6b, #ff8001);
    border: none;
    font-weight: 600;
    padding: 0.75rem 2rem;
}

.reset-btn:hover {
    background: linear-gradient(135deg, #ff8001, #ff6b6b);
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.75rem 1rem;
}

.toggle-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Visualization Container */
.visualization-container {
    width: 100%;
    min-height: 800px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(100, 255, 218, 0.3);
    border-radius: 16px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(100, 255, 218, 0.2);
    border-top-color: #64ffda;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* SVG Styles */
#techStackViz svg {
    width: 100%;
    height: 100%;
}

.cluster-region {
    transition: all 0.5s ease;
}

.bubble {
    cursor: pointer;
    transition: all 0.3s ease;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 2;
}

.bubble:hover {
    stroke: #64ffda;
    stroke-width: 4;
    filter: brightness(1.3) drop-shadow(0 0 10px currentColor);
}

.bubble.filtered-out {
    opacity: 0.15;
    pointer-events: none;
}

.company-label {
    font-size: 11px;
    font-weight: 700;
    fill: #ffffff;
    text-anchor: middle;
    pointer-events: none;
    text-shadow:
        1px 1px 2px rgba(0, 0, 0, 0.9),
        -1px -1px 2px rgba(0, 0, 0, 0.9),
        1px -1px 2px rgba(0, 0, 0, 0.9),
        -1px 1px 2px rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.company-label.visible {
    opacity: 1;
}

/* Hardware Technology Colors */
.tech-superconducting { fill: #4a90e2; }
.tech-trapped-ion { fill: #e2a14a; }
.tech-photonic { fill: #e24a7f; }
.tech-neutral-atom { fill: #7f4ae2; }
.tech-annealing { fill: #4ae27f; }
.tech-spin-qubit { fill: #e2d44a; }
.tech-topological { fill: #4ae2e2; }
.tech-nv-center { fill: #e24ae2; }
.tech-unknown { fill: #888888; }

/* Stack Layer Colors */
.layer-full-stack { fill: #ff6b6b; }
.layer-hardware { fill: #4ecdc4; }
.layer-software { fill: #95e1d3; }
.layer-applications { fill: #f38181; }
.layer-infrastructure { fill: #aa96da; }

/* Statistics Dashboard */
.stats-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, rgba(100, 255, 218, 0.1), rgba(255, 128, 1, 0.1));
    border: 2px solid rgba(100, 255, 218, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: #64ffda;
    box-shadow: 0 10px 30px rgba(100, 255, 218, 0.3);
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(90deg, #64ffda, #ff8001);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #b0c4de;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Legend */
.legend-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.legend-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
}

.legend-section h3 {
    font-size: 1.2rem;
    color: #64ffda;
    margin-bottom: 1rem;
    text-align: center;
}

.legend-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.legend-item:hover {
    background: rgba(100, 255, 218, 0.1);
    transform: translateX(5px);
}

.legend-color {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.legend-item:hover .legend-color {
    border-color: #64ffda;
    box-shadow: 0 0 15px currentColor;
}

.legend-label {
    flex: 1;
    font-size: 0.9rem;
}

.legend-count {
    font-size: 0.85rem;
    color: #888;
    font-weight: 600;
}

.size-legend {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.5rem 0;
}

.size-example {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.size-circle {
    border-radius: 50%;
    border: 2px solid #64ffda;
    background: rgba(100, 255, 218, 0.2);
}

.size-large {
    width: 60px;
    height: 60px;
}

.size-medium {
    width: 40px;
    height: 40px;
}

.size-small {
    width: 25px;
    height: 25px;
}

/* Info Panel */
.info-panel {
    position: fixed;
    top: 50%;
    right: 2rem;
    transform: translateY(-50%);
    width: 350px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    background: rgba(26, 26, 46, 0.98);
    border: 2px solid #64ffda;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.info-panel.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) translateX(50px);
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #ff6b6b;
    color: white;
    transform: rotate(90deg);
}

.info-panel h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #64ffda;
    padding-right: 2rem;
}

.info-panel #companyDetails {
    line-height: 1.8;
    color: #b0c4de;
}

.info-panel #companyDetails strong {
    color: #64ffda;
}

.view-profile-btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #00c4e8, #ff8001);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-profile-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 128, 1, 0.4);
}

/* Technology Deep Dive */
.tech-deep-dive {
    margin-top: 4rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
}

.tech-deep-dive h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    background: linear-gradient(90deg, #64ffda, #ff8001);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.deep-dive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.deep-dive-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(100, 255, 218, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.deep-dive-card:hover {
    border-color: #64ffda;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(100, 255, 218, 0.2);
}

.deep-dive-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #64ffda;
}

.deep-dive-card ul {
    list-style: none;
    padding: 0;
}

.deep-dive-card li {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
    color: #b0c4de;
}

.deep-dive-card li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #ff8001;
}

.deep-dive-card strong {
    color: #64ffda;
}

/* Footer */
.tech-stack-footer {
    margin-top: 4rem;
    padding: 2rem;
    text-align: center;
    border-top: 2px solid rgba(100, 255, 218, 0.2);
    color: #888;
}

.tech-stack-footer a {
    color: #64ffda;
    text-decoration: none;
    transition: color 0.3s ease;
}

.tech-stack-footer a:hover {
    color: #ff8001;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .visualization-container {
        min-height: 600px;
    }
}

@media (max-width: 768px) {
    .tech-stack-container {
        padding: 1rem;
    }

    .page-title h2 {
        font-size: 1.5rem;
    }

    .controls {
        flex-direction: column;
    }

    .control-group {
        width: 100%;
    }

    .visualization-container {
        min-height: 500px;
    }

    .info-panel {
        position: fixed;
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        transform: none;
        width: 100%;
        max-width: 100%;
        border-radius: 16px 16px 0 0;
    }

    .info-panel.hidden {
        transform: translateY(100%);
    }

    .stats-dashboard {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-number {
        font-size: 2rem;
    }

    .legend-container {
        grid-template-columns: 1fr;
    }

    .deep-dive-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tech-card,
.stat-card,
.legend-section,
.deep-dive-card {
    animation: fadeIn 0.6s ease-out backwards;
}

.tech-card:nth-child(1) { animation-delay: 0.1s; }
.tech-card:nth-child(2) { animation-delay: 0.2s; }
.tech-card:nth-child(3) { animation-delay: 0.3s; }
.tech-card:nth-child(4) { animation-delay: 0.4s; }
.tech-card:nth-child(5) { animation-delay: 0.5s; }
.tech-card:nth-child(6) { animation-delay: 0.6s; }
