:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --background-color: #f8f9fa;
    --paper-color: #ffffff;
    --text-color: #2c3e50;
    --text-light: #7f8c8d;
    --border-color: #bdc3c7;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-light: 0 1px 3px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    background-image: 
        radial-gradient(circle at 20px 50px, rgba(120,119,198,0.03) 1px, transparent 1px),
        radial-gradient(circle at 40px 80px, rgba(120,119,198,0.03) 1px, transparent 1px);
    background-size: 100px 100px;
    padding-bottom: 80px;
    min-height: 100vh;
}

.app-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.status-indicator {
    font-size: 0.9rem;
}

.status-indicator .online {
    color: var(--success-color);
}

.status-indicator .offline {
    color: var(--warning-color);
}

.app-main {
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.content-section {
    display: none;
    background: var(--paper-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.content-section.active {
    display: block;
}

/* Map Styles */
.map-container {
    position: relative;
    background: #e8f4f8;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border-color);
}

#mapCanvas {
    width: 100%;
    height: 400px;
    display: block;
    background: linear-gradient(45deg, #e8f4f8 25%, transparent 25%),
                linear-gradient(-45deg, #e8f4f8 25%, transparent 25%),
                linear-gradient(45deg, transparent 75%, #e8f4f8 75%),
                linear-gradient(-45deg, transparent 75%, #e8f4f8 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.map-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.control-btn {
    width: 40px;
    height: 40px;
    background: var(--paper-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-light);
    transition: all 0.2s ease;
}

.control-btn:hover {
    background: var(--background-color);
    transform: translateY(-1px);
}

.location-info {
    background: var(--paper-color);
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
}

/* POI Styles */
.poi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.poi-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.poi-filters select,
.poi-filters input {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
}

.poi-list {
    display: grid;
    gap: 1rem;
}

.poi-item {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.2s ease;
}

.poi-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.poi-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.poi-item-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.poi-item-actions {
    display: flex;
    gap: 0.5rem;
}

.poi-rating {
    color: var(--warning-color);
    margin: 0.5rem 0;
}

.poi-category {
    display: inline-block;
    background: var(--secondary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.poi-description {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Directions Styles */
.directions-form {
    background: var(--background-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.input-group {
    margin-bottom: 1rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.input-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.route-result {
    background: var(--success-color);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: none;
}

.route-instructions {
    background: var(--background-color);
    border-radius: 8px;
    padding: 1rem;
    display: none;
}

.route-step {
    padding: 0.75rem;
    border-left: 3px solid var(--secondary-color);
    margin-bottom: 0.5rem;
    background: var(--paper-color);
    border-radius: 0 6px 6px 0;
}

/* Bookmarks Styles */
.bookmarks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.bookmarks-list {
    display: grid;
    gap: 1rem;
}

.bookmark-item {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bookmark-info h3 {
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.bookmark-info p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.bookmark-empty {
    text-align: center;
    color: var(--text-light);
    padding: 2rem;
}

/* FAQ Styles */
.faq-section {
    background: var(--paper-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.faq-container {
    display: grid;
    gap: 0.5rem;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    background: var(--background-color);
    border: none;
    padding: 1rem;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}

.faq-question:hover {
    background: var(--border-color);
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
}

.faq-icon {
    transition: transform 0.2s ease;
    font-size: 1.2rem;
}

.faq-answer {
    padding: 0 1rem 1rem 1rem;
    background: var(--paper-color);
    animation: slideDown 0.3s ease;
}

.faq-answer[hidden] {
    display: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 200px;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: var(--paper-color);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.close:hover {
    color: var(--accent-color);
}

#poiForm {
    display: grid;
    gap: 1rem;
}

#poiForm input,
#poiForm select,
#poiForm textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
}

.rating-input {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stars {
    display: flex;
    gap: 0.25rem;
}

.star {
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.star:hover,
.star.active {
    transform: scale(1.2);
}

/* Button Styles */
.primary-btn, .secondary-btn, .danger-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
}

.primary-btn {
    background: var(--secondary-color);
    color: white;
}

.primary-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.secondary-btn {
    background: var(--background-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.secondary-btn:hover {
    background: var(--border-color);
}

.danger-btn {
    background: var(--accent-color);
    color: white;
}

.danger-btn:hover {
    background: #c0392b;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.icon-btn:hover {
    background: var(--background-color);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--paper-color);
    border-top: 1px solid var(--border-color);
    display: flex;
    padding: 0.5rem 0;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    text-decoration: none;
    color: var(--text-light);
    transition: color 0.2s ease;
}

.nav-item.active {
    color: var(--secondary-color);
}

.nav-item i {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.nav-item span {
    font-size: 0.8rem;
    font-weight: 500;
}

/* Footer */
footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-main {
        padding: 0.5rem;
    }
    
    .content-section {
        padding: 1rem;
        border-radius: 8px;
    }
    
    .poi-filters {
        flex-direction: column;
    }
    
    .poi-filters select,
    .poi-filters input {
        min-width: auto;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 1.5rem;
    }
    
    .poi-header,
    .bookmarks-header,
    .directions-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    #mapCanvas {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .app-header h1 {
        font-size: 1.2rem;
    }
    
    .input-group {
        margin-bottom: 0.75rem;
    }
    
    .primary-btn, .secondary-btn, .danger-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .poi-item-header {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--text-light);
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-light);
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
