* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 300;
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.controls {
    padding: 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.booking-section {
    margin-bottom: 20px;
}

.booking-section h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.input-group label {
    font-weight: 600;
    color: #495057;
}

.input-group input {
    padding: 10px 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 16px;
    width: 100px;
    transition: border-color 0.3s;
}

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

button {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

button:active {
    transform: translateY(0);
}

.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.action-buttons button {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.action-buttons button:nth-child(2) {
    background: linear-gradient(135deg, #dc3545, #fd7e14);
}

.action-buttons button:nth-child(3) {
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
}

.result {
    margin-top: 15px;
    padding: 15px;
    border-radius: 8px;
    font-weight: 600;
}

.result.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.result.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.hotel-layout {
    padding: 30px;
}

.hotel-layout h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.legend {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-item span {
    font-weight: 600;
    color: #495057;
}

.floors-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
}

.hotel-building {
    display: flex;
    gap: 20px;
    align-items: stretch;
}

.stairs-column {
    width: 80px;
    background: linear-gradient(135deg, #495057, #6c757d);
    border: 3px solid #343a40;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 600px;
    position: relative;
}

.stairs-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    font-weight: bold;
    gap: 20px;
}

.stairs-label, .lift-label {
    writing-mode: vertical-lr;
    text-orientation: sideways;
    font-size: 14px;
    letter-spacing: 2px;
    padding: 10px 0;
    transform: rotate(180deg);
}

.stairs-column-legend {
    background: linear-gradient(135deg, #495057, #6c757d);
    color: white;
    border: 2px solid #343a40;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 10px;
    font-weight: bold;
    text-align: center;
}

.floor {
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 20px;
    background: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.floor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.floor-title {
    font-size: 1.3em;
    font-weight: 700;
    color: #2c3e50;
}

.floor-info {
    font-size: 0.9em;
    color: #6c757d;
}

.rooms-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.room-box {
    width: 60px;
    height: 50px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.room-box:hover {
    transform: scale(1.05);
}

.room-box.available {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.room-box.occupied {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.room-box.selected {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 193, 7, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0); }
}

.statistics {
    padding: 30px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.statistics h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.9em;
    color: #6c757d;
    margin-bottom: 8px;
    font-weight: 600;
}

.stat-value {
    display: block;
    font-size: 2em;
    font-weight: 700;
    color: #2c3e50;
}

.travel-time-info {
    padding: 30px;
    background: white;
}

.travel-time-info h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.booking-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.booking-info p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.booking-info strong {
    color: #2c3e50;
}

.travel-details {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid #dee2e6;
}

.travel-summary {
    font-size: 1.1em;
    font-weight: 600;
    color: #667eea;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 10px;
    }
    
    header {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .controls, .hotel-layout, .statistics, .travel-time-info {
        padding: 20px;
    }
    
    .hotel-building {
        flex-direction: column;
        gap: 15px;
    }
    
    .stairs-column {
        width: 100%;
        height: 60px;
        min-height: auto;
    }
    
    .stairs-content {
        flex-direction: row;
        gap: 20px;
    }
    
    .stairs-label, .lift-label {
        writing-mode: horizontal-tb;
        text-orientation: mixed;
    }
    
    .room-box {
        width: 50px;
        height: 40px;
        font-size: 10px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
