/* css/style.css */
:root {
    --primary-color: #1a5276;
    --secondary-color: #2980b9;
    --accent-color: #e67e22;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --light-gray: #ecf0f1;
    --dark-gray: #2c3e50;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0,0,0,0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    background: var(--light-gray);
}

.screen {
    display: none;
    height: 100vh;
    width: 100vw;
}

.screen.active {
    display: block;
}

/* Welcome Screen */
#welcome-screen {
    background: linear-gradient(135deg, #1a5276 0%, #2980b9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-content {
    text-align: center;
    color: var(--white);
    padding: 20px;
}

.uos-logo {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
    border-radius: 20px;
    background: var(--white);
    padding: 10px;
}

.welcome-content h1 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.welcome-content h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    opacity: 0.9;
}

.welcome-content p {
    margin-bottom: 30px;
    opacity: 0.8;
}

.primary-btn {
    background: var(--white);
    color: var(--primary-color);
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.primary-btn:active {
    transform: scale(0.95);
}

/* Map Container */
#map {
    height: 100vh;
    width: 100vw;
    position: absolute;
    top: 0;
    left: 0;
}

/* Search Panel */
.search-panel {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow);
    z-index: 1000;
    overflow: hidden;
}

.search-tabs {
    display: flex;
    background: var(--light-gray);
}

.tab {
    flex: 1;
    padding: 15px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 500;
    color: var(--dark-gray);
    transition: background 0.3s;
}

.tab.active {
    background: var(--white);
    color: var(--primary-color);
    font-weight: bold;
    border-bottom: 3px solid var(--primary-color);
}

.tab-content {
    display: none;
    padding: 15px;
}

.tab-content.active {
    display: block;
}

#destination-input,
#location-input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

#destination-input:focus,
#location-input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.suggestions {
    margin-top: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 10px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.2s;
}

.suggestion-item:hover,
.suggestion-item:active {
    background: var(--light-gray);
}

.suggestion-item .building-code {
    font-weight: bold;
    color: var(--primary-color);
    margin-right: 10px;
}

.hint {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #7f8c8d;
    text-align: center;
}

/* Route Panel */
.route-panel {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    max-height: 60vh;
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow);
    z-index: 1000;
    overflow-y: auto;
    transition: all 0.3s;
}

.route-panel.hidden {
    display: none;
}

.route-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 15px 15px 0 0;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

#route-summary {
    padding: 15px;
    background: var(--light-gray);
    font-weight: bold;
}

#route-steps {
    padding: 15px;
}

.route-step {
    padding: 10px;
    border-left: 3px solid var(--secondary-color);
    margin-bottom: 10px;
    background: #f8f9fa;
}

.route-step .step-number {
    display: inline-block;
    width: 25px;
    height: 25px;
    background: var(--secondary-color);
    color: var(--white);
    text-align: center;
    line-height: 25px;
    border-radius: 50%;
    margin-right: 10px;
    font-size: 0.9rem;
}

.route-step .direction-icon {
    font-size: 1.5rem;
    margin-right: 10px;
}

/* Building Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--white);
    padding: 20px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
    font-size: 1.5rem;
}

#modal-floor-guide {
    margin-top: 15px;
    padding: 10px;
    background: #fff3cd;
    border-radius: 5px;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (min-width: 768px) {
    .search-panel {
        left: 20px;
        transform: none;
        width: 350px;
    }
    
    .route-panel {
        right: 20px;
        left: auto;
        transform: none;
        width: 350px;
    }
}

/* Custom Map Markers */
.custom-marker {
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 3px solid var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.start-marker {
    background: var(--success-color);
}

.end-marker {
    background: var(--danger-color);
}

.search-panel, .route-panel, .modal {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

input {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}