/* ==========================================
   ESP32 Teknik Panel - Custom Styles
   tekno.mutosb.org.tr
   ========================================== */

/* ===== SCROLLBAR ===== */
.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ===== GLASS CARD ===== */
.glass-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
}

/* ===== STAT CARDS ===== */
.stat-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 1.25rem;
    transition: all 0.3s;
}
.stat-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}
.stat-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}
.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
    line-height: 1;
    margin-bottom: 0.25rem;
}
.stat-label {
    font-size: 0.7rem;
    color: rgb(148, 163, 184);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* ===== DEVICE CARD ===== */
.device-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 1rem;
    transition: all 0.25s;
}
.device-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* ===== FEATURE BADGE ===== */
.feature-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ===== MINI STAT ===== */
.mini-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    padding: 0.75rem;
    font-size: 0.75rem;
}

/* ===== FEATURE TILES ===== */
.feature-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 0.5rem;
    border-radius: 0.75rem;
    background: rgba(17, 24, 39, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: rgb(107, 114, 128);
    transition: all 0.3s;
    cursor: default;
}
.feature-tile.active {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.2);
    color: rgb(191, 219, 254);
}
.feature-tile.active:hover {
    border-color: rgba(59, 130, 246, 0.4);
}

/* ===== ESP32 PIN MAP ===== */
.esp32-chip {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 1.5rem;
    padding: 2rem 3rem;
    max-width: 700px;
    position: relative;
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.1), inset 0 0 40px rgba(0, 0, 0, 0.3);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
.chip-label {
    grid-column: 1 / -1;
    text-align: center;
    font-weight: 800;
    font-size: 1.1rem;
    color: rgba(59, 130, 246, 0.6);
    letter-spacing: 0.1em;
    margin-bottom: 0rem;
}
.chip-sublabel {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 0.6rem;
    color: rgba(100, 116, 139, 0.5);
    margin-bottom: 0.5rem;
}

.pin-column {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.pin-column.right {
    align-items: flex-end;
}

.pin-column.right .pin-row {
    flex-direction: row-reverse;
}
.pin-column.right .pin-num {
    text-align: center;
}
.pin-column.right .pin-func {
    text-align: right;
}

.pin-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.65rem;
}
.pin-row:hover {
    background: rgba(255, 255, 255, 0.05);
}
.pin-num {
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: white;
    min-width: 2rem;
    text-align: center;
}
.pin-name {
    font-weight: 600;
    color: rgb(148, 163, 184);
    min-width: 4rem;
}
.pin-func {
    color: rgb(100, 116, 139);
    font-size: 0.6rem;
}

/* Pin type colors */
.pin-power { background: rgba(239, 68, 68, 0.1); border-left: 2px solid rgb(239, 68, 68); }
.pin-gnd { background: rgba(100, 116, 139, 0.1); border-left: 2px solid rgb(100, 116, 139); }
.pin-rs485 { background: rgba(34, 197, 94, 0.08); border-left: 2px solid rgb(34, 197, 94); }
.pin-i2c { background: rgba(59, 130, 246, 0.08); border-left: 2px solid rgb(59, 130, 246); }
.pin-spi { background: rgba(249, 115, 22, 0.08); border-left: 2px solid rgb(249, 115, 22); }
.pin-adc { background: rgba(20, 184, 166, 0.08); border-left: 2px solid rgb(20, 184, 166); }
.pin-dac { background: rgba(168, 85, 247, 0.08); border-left: 2px solid rgb(168, 85, 247); }
.pin-touch { background: rgba(236, 72, 153, 0.08); border-left: 2px solid rgb(236, 72, 153); }
.pin-gpio { background: rgba(234, 179, 8, 0.08); border-left: 2px solid rgba(234, 179, 8, 0.3); }

.right .pin-power { border-left: none; border-right: 2px solid rgb(239, 68, 68); }
.right .pin-gnd { border-left: none; border-right: 2px solid rgb(100, 116, 139); }
.right .pin-rs485 { border-left: none; border-right: 2px solid rgb(34, 197, 94); }
.right .pin-i2c { border-left: none; border-right: 2px solid rgb(59, 130, 246); }
.right .pin-spi { border-left: none; border-right: 2px solid rgb(249, 115, 22); }
.right .pin-adc { border-left: none; border-right: 2px solid rgb(20, 184, 166); }
.right .pin-dac { border-left: none; border-right: 2px solid rgb(168, 85, 247); }
.right .pin-touch { border-left: none; border-right: 2px solid rgb(236, 72, 153); }
.right .pin-gpio { border-left: none; border-right: 2px solid rgba(234, 179, 8, 0.3); }

/* ===== ANIMATIONS ===== */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(59, 130, 246, 0.3); }
    50% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.6); }
}

@keyframes slide-up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.glass-card, .stat-card, .device-card {
    animation: slide-up 0.3s ease-out;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .stat-value { font-size: 1.25rem; }
    .esp32-chip { padding: 1rem; }
    .pin-func { display: none; }
}
