.seat-diagram-wrapper {
    display: flex;
    justify-content: center;
    margin: 40px 0;
    perspective: 1000px;
}

.bus-wrapper {
    position: relative;
    max-width: 440px;
    width: 100%;
}

/* Side Mirrors */
.bus-mirror {
    position: absolute;
    top: 50px;
    width: 25px;
    height: 45px;
    background: linear-gradient(90deg, #111, #333, #111);
    border-radius: 4px;
    box-shadow: 0 10px 15px rgba(0,0,0,0.5), inset 0 0 5px rgba(255,255,255,0.2);
    z-index: 5;
}

.bus-mirror::after {
    content: '';
    position: absolute;
    top: 15px;
    width: 20px;
    height: 8px;
    background: #222;
    z-index: -1;
}

.mirror-left {
    left: -20px;
    border-radius: 10px 0 0 10px;
}
.mirror-left::after {
    right: -15px;
}

.mirror-right {
    right: -20px;
    border-radius: 0 10px 10px 0;
}
.mirror-right::after {
    left: -15px;
}

/* Bus Body */
.bus-interior {
    background: linear-gradient(to right, #1f2024, #2a2a2e, #1f2024);
    border-radius: 40px 40px 20px 20px;
    padding: 0;
    width: 100%;
    box-shadow: 
        inset 0 0 15px rgba(0,0,0,0.8),
        0 15px 35px rgba(0, 0, 0, 0.4),
        0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    z-index: 10;
    border: 4px solid #151515;
}

.bus-bumper-front {
    height: 12px;
    background: linear-gradient(to bottom, #444, #222);
    border-radius: 30px 30px 0 0;
    margin: 4px 10px 0;
    box-shadow: inset 0 2px 2px rgba(255,255,255,0.1);
}

.bus-windshield {
    background: linear-gradient(135deg, #1a1e24 0%, #2c333a 50%, #1a1e24 100%);
    padding: 25px 20px 15px;
    text-align: center;
    border-bottom: 6px solid #111;
    position: relative;
    overflow: hidden;
    margin: 0 8px;
    border-radius: 20px 20px 0 0;
    box-shadow: inset 0 5px 15px rgba(0,0,0,0.6);
}

/* Windshield Reflection */
.bus-windshield::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 50%;
    height: 150%;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(25deg);
}

.wipers {
    position: absolute;
    bottom: 5px;
    width: 80px;
    height: 4px;
    background: #000;
    border-radius: 2px;
    transform-origin: left center;
    transform: rotate(-15deg);
}
.wiper-left { left: 20%; }
.wiper-right { left: 60%; }

.bus-route-sign {
    display: inline-block;
    background: #0a0a0a;
    color: #ffaa00;
    font-weight: 800;
    font-size: 16px;
    padding: 6px 30px;
    border-radius: 6px;
    letter-spacing: 3px;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(255, 170, 0, 0.2), inset 0 2px 5px rgba(0,0,0,0.8);
    border: 2px solid #222;
    text-shadow: 0 0 5px rgba(255, 170, 0, 0.5);
    position: relative;
    z-index: 2;
}

.bus-cabin {
    padding: 20px 16px 15px;
    background: #222327;
    position: relative;
}

.driver-area {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 0 10px;
}

.driver-seat-container {
    flex: 0 0 110px;
    background: linear-gradient(145deg, #1a1a1c, #2a2a2e);
    border-radius: 12px;
    padding: 10px;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.5), 0 5px 10px rgba(0,0,0,0.3);
    border: 1px solid #333;
}

.driver-seat {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, #333, #111);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    margin: 0 auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.6), inset 0 2px 2px rgba(255,255,255,0.1);
}

.steering-icon {
    color: #fff;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.5));
}

.aisle-block {
    flex: 1;
    min-width: 40px;
}

.cabin-divider {
    height: 4px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.1), transparent);
    margin: 10px 0 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.seat-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    justify-content: center;
}

.back-row {
    margin-top: 15px;
    margin-bottom: 10px;
}

/* Realistic Seats */
.seat-item {
    flex: 0 0 65px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.seat-item:hover {
    transform: translateY(-3px) scale(1.02);
}

.seat-item.no-hover:hover {
    transform: none;
    cursor: default;
}

.seat-cushion {
    background: linear-gradient(to bottom, #e2e6ea, #bdc3c7);
    border: 1px solid #9aa0a6;
    border-radius: 8px 8px 12px 12px;
    height: 55px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 
        inset 0 2px 4px rgba(255,255,255,0.8),
        inset 0 -5px 10px rgba(0,0,0,0.15),
        0 6px 10px rgba(0, 0, 0, 0.4);
    position: relative;
}

.seat-headrest {
    position: absolute;
    top: -6px;
    width: 60%;
    height: 12px;
    background: linear-gradient(to bottom, #d1d5db, #9ca3af);
    border-radius: 6px 6px 0 0;
    border: 1px solid #888;
    border-bottom: none;
    box-shadow: inset 0 2px 2px rgba(255,255,255,0.6);
}

.seat-armrest {
    position: absolute;
    top: 20%;
    width: 6px;
    height: 35px;
    background: linear-gradient(to right, #555, #333);
    border-radius: 3px;
    box-shadow: 1px 2px 3px rgba(0,0,0,0.4);
}

.armrest-left { left: -3px; }
.armrest-right { right: -3px; }

.seat-num {
    font-size: 14px;
    font-weight: 800;
    color: #333;
    text-shadow: 0 1px 1px rgba(255,255,255,0.5);
    z-index: 2;
    margin-top: 5px;
}

/* Selected State */
.seat-item.selected .seat-cushion {
    background: linear-gradient(to bottom, #3b82f6, #1d4ed8);
    border-color: #1e3a8a;
    box-shadow: 
        inset 0 2px 4px rgba(255,255,255,0.3),
        inset 0 -5px 10px rgba(0,0,0,0.3),
        0 0 15px rgba(37, 99, 235, 0.6),
        0 6px 10px rgba(0, 0, 0, 0.4);
}

.seat-item.selected .seat-headrest {
    background: linear-gradient(to bottom, #60a5fa, #2563eb);
    border-color: #1e3a8a;
}

.seat-item.selected .seat-num {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* Taken State */
.seat-item.taken .seat-cushion {
    background: linear-gradient(to bottom, #4b5563, #374151);
    border-color: #1f2937;
    cursor: not-allowed;
    box-shadow: inset 0 -3px 5px rgba(0,0,0,0.5), 0 2px 4px rgba(0,0,0,0.3);
}

.seat-item.taken .seat-headrest {
    background: linear-gradient(to bottom, #6b7280, #4b5563);
    border-color: #1f2937;
}

.seat-item.taken .seat-num {
    color: #9ca3af;
    text-shadow: none;
}

/* Disabled Seat State (admin-set unavailable) */
.seat-item.disabled-seat .seat-cushion {
    background: linear-gradient(to bottom, #fca5a5, #ef4444);
    border-color: #b91c1c;
    cursor: not-allowed;
    box-shadow: inset 0 -3px 5px rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.2);
    opacity: 0.7;
}

.seat-item.disabled-seat .seat-num {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.seat-item.disabled-seat:hover {
    transform: none;
}

.seat-legend.disabled-legend {
    background: #ef4444;
    border: 1.5px solid #b91c1c;
}

/* Emergency Exit Cushion */
.emergency-cushion {
    background: linear-gradient(to bottom, #4b5563, #374151) !important;
    border: 1px dashed #6b7280 !important;
    justify-content: center;
}
.emergency-cushion .seat-headrest, .emergency-cushion .seat-armrest {
    display: none;
}

.emergency-exit, .exit-label {
    font-size: 9px;
    font-weight: 700;
    color: #9ca3af !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    line-height: 1.2;
}

/* Aisle */
.aisle-space {
    flex: 0 0 35px;
    display: flex;
    justify-content: center;
}

.aisle-path {
    width: 20px;
    height: 100%;
    background: repeating-linear-gradient(
      0deg,
      rgba(255,255,255,0.02),
      rgba(255,255,255,0.02) 10px,
      transparent 10px,
      transparent 20px
    );
    border-radius: 2px;
}

.bus-exit-rear {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 0 5px;
    color: #9ca3af;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-top: 2px dashed rgba(255,255,255,0.1);
    margin-top: 10px;
}

.bus-bumper-back {
    height: 8px;
    background: linear-gradient(to bottom, #222, #111);
    border-radius: 0 0 20px 20px;
    margin: 10px -16px -15px;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.5);
}

.exit-icon {
    color: #6b7280;
    filter: drop-shadow(0 0 2px rgba(107, 114, 128, 0.5));
}

@media (max-width: 480px) {
    .bus-wrapper { max-width: 100%; }
    .bus-mirror { display: none; /* Hide mirrors on very small screens to save space */ }
    
    .seat-item { flex: 0 0 55px; }
    .seat-cushion { height: 45px; }
    .seat-num { font-size: 12px; margin-top: 3px; }
    
    .driver-seat-container { flex: 0 0 80px; }
    .aisle-space { flex: 0 0 25px; }
}
