/* ==================== GENEL STILLER ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    min-height: 100vh;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    width: 250px;
}

.sidebar-sticky {
    padding: 30px 15px;
}

.sidebar-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255,255,255,0.2);
}

.experiment-nav .nav-link {
    color: rgba(255,255,255,0.85);
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.experiment-nav .nav-link:hover {
    background: rgba(255,255,255,0.15);
    color: white;
    transform: translateX(5px);
}

.experiment-nav .nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    padding: 40px;
    min-height: 100vh;

    /* 🔥 ASIL ÇÖZÜM */
    margin-left: 250px;
}


.main-content.with-sidebar {
    margin-left: 250px;
}

/* ==================== ANA SAYFA ==================== */
.welcome-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    margin-bottom: 20px;
}

.welcome-header h1 {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

/* ==================== DENEY KARTLARI ==================== */
.experiment-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: none;
}

.experiment-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.experiment-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.experiment-card .card-body {
    padding: 25px;
}

.experiment-card .card-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
}

.experiment-card .card-text {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    min-height: 60px;
}

.btn-foy, .btn-experiment {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.btn-foy {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.btn-foy:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f6ea8 100%);
    transform: scale(1.05);
}

.btn-experiment {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
}

.btn-experiment:hover {
    background: linear-gradient(135deg, #229954 0%, #1e8449 100%);
    transform: scale(1.05);
}

/* ==================== PAGE HEADER ==================== */
.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

/* ==================== SECTION MENU ==================== */
.section-menu {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 25px 0;
}

.section-btn {
    padding: 10px 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.section-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.section-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

/* ==================== EXPERIMENT CONTENT ==================== */
.experiment-content {
    background: white;
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.experiment-content h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    border-left: 5px solid #667eea;
    padding-left: 20px;
    font-size: 28px;
}

.experiment-content h3 {
    color: #34495e;
    margin: 25px 0 15px 0;
    font-size: 22px;
}

.experiment-content p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: #555;
}

.experiment-content ul {
    margin-left: 25px;
    margin-bottom: 15px;
}

.experiment-content ul li {
    margin-bottom: 10px;
    line-height: 1.7;
}

/* ==================== VIDEO WRAPPER ==================== */
.video-wrapper {
    position: relative;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4/3;
}

#cameraStream {
    width: 100%;
    height: 100%;
    border: none;
}

.status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.status-online {
    background: #27ae60;
    color: white;
}

.status-offline {
    background: #e74c3c;
    color: white;
}

/* ==================== EXPERIMENT SELECT BUTTONS ==================== */
.exp-select-btn {
    font-weight: 600;
    padding: 12px;
    transition: all 0.3s ease;
}

.exp-select-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border-color: transparent !important;
}

/* ==================== VOLTAGE DISPLAY ==================== */
.voltage-display {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 30px;
    border-radius: 12px;
    margin: 10px 0;
}

.voltage-display span {
    color: #27ae60;
}

/* ==================== CONTROL PANELS ==================== */
.control-panel {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.control-panel h6 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 16px;
}

/* ==================== TOGGLE SWITCHES ==================== */
.toggle-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.toggle-btn {
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
}

.toggle-btn:hover {
    border-color: #667eea;
    background: #f8f9fa;
}

.toggle-btn.active {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    border-color: transparent;
}

/* ==================== POTENTIOMETER CONTROL ==================== */
.pot-control {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
}

.pot-display {
    text-align: center;
    margin: 15px 0;
}

.pot-display .value {
    font-size: 36px;
    font-weight: bold;
    color: #667eea;
}

.pot-display .unit {
    font-size: 20px;
    color: #666;
}

.pot-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.pot-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pot-btn-minus {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.pot-btn-plus {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
}

.pot-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.pot-input {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
    width: 120px;
    margin: 0 auto;
}

.pot-input:focus {
    border-color: #667eea;
    outline: none;
}

/* ==================== FORMÜLLER ==================== */
.formula {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    margin: 25px 0;
    font-family: 'Courier New', monospace;
    color: #2c3e50;
}

/* ==================== TABLOLAR ==================== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
}

table tr:hover {
    background: #f8f9fa;
}

table tr:last-child td {
    border-bottom: none;
}

/* ==================== DİRENÇ HESAPLAYICI ==================== */
.resistor-calculator {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    margin: 20px 0;
}

.resistor-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
}

.resistor-body {
    width: 300px;
    height: 80px;
    background: #d4a373;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.resistor-lead {
    width: 50px;
    height: 3px;
    background: #888;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.resistor-lead.left {
    left: -50px;
}

.resistor-lead.right {
    right: -50px;
}

.resistor-band {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 15px;
}

.color-selectors {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.color-selector {
    display: flex;
    flex-direction: column;
}

.color-selector label {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 14px;
    color: #2c3e50;
}

.color-selector select {
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.color-selector select:focus {
    border-color: #667eea;
    outline: none;
}

.resistor-result {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    text-align: center;
}

.resistor-result h4 {
    margin-bottom: 10px;
}

.resistor-result .value {
    font-size: 32px;
    font-weight: bold;
}

/* ==================== ANIMASYONLAR ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.experiment-content,
#labPage,
#experimentPage,
#homePage {
    animation: fadeIn 0.4s ease;
}

.experiment-nav .nav-link {
    animation: slideIn 0.3s ease;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        min-height: auto;
    }
    
    .main-content {
        margin-left: 0 !important;
        padding: 20px;
    }
    
    .welcome-header {
        padding: 40px 20px;
    }
    
    .welcome-header h1 {
        font-size: 24px;
    }
    
    .pot-control {
        padding: 15px;
    }
    
    .pot-display .value {
        font-size: 28px;
    }
    
    .color-selectors {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) {
    .sidebar {
        display: block !important;
    }
}

/* ==================== UTILITY CLASSES ==================== */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

