/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #ecf0f1;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    padding-top: 100px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation Styles */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--white);
}

.nav-logo i {
    margin-right: 10px;
    color: var(--bg-light);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.nav-link:hover, .nav-link.active {
    color: var(--white);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.register-btn {
    color: var(--black) !important;
    padding: 0.5rem 1.5rem !important;
}

.register-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}


.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 3px 0;
    transition: var(--transition);
}




/* User Menu Wrapper */
.user-menu-wrapper {
    position: relative;
}

.user-menu-container {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.welcome-text {
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
}

/* User Controls - Avatar + Dropdown Button */
.user-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Avatar Link */
.user-avatar-link {
    text-decoration: none;
    display: block;
}

/* User Avatar */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    color: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 2px solid transparent;
}

.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Dropdown Toggle Button */
.dropdown-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 0.8rem;
}

.dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(180deg);
}

.dropdown-toggle.active {
    background: rgba(255, 255, 255, 0.4);
    transform: rotate(180deg);
}

/* Dropdown Menu */
.user-dropdown {
    position: absolute;
    top: 55px;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    display: none;
    overflow: hidden;
    z-index: 1000;
    animation: dropdownSlide 0.3s ease;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-dropdown.active {
    display: block;
}

/* Dropdown Items */
.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: #333;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.user-dropdown a:hover {
    background: #f8f9fa;
    border-left-color: #667eea;
    padding-left: 25px;
}

.user-dropdown a i {
    color: #667eea;
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

/* Logout Link Special Styling */
.user-dropdown .logout-link {
    color: #f44336;
}

.user-dropdown .logout-link i {
    color: #f44336;
}

.user-dropdown .logout-link:hover {
    background: #ffebee;
    border-left-color: #f44336;
}

/* Dropdown Divider */
.dropdown-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 8px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .welcome-text {
        display: none;
    }
    
    .user-menu-container {
        gap: 8px;
    }
    
    .user-dropdown {
        right: -10px;
        min-width: 200px;
    }
}

@media (max-width: 480px) {
    .user-avatar {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .dropdown-toggle {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }
}



/* Footer */
footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.footer-section p, .footer-section ul {
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--secondary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background: #2980b9;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: var(--shadow);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .search-grid {
        grid-template-columns: 1fr;
    }

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hotels-grid, .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .search-container {
        padding: 1rem;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .featured-hotels h2, .features h2, .about-text h2 {
        font-size: 2rem;
    }
}

/* Centered Flash Messages */
.flash-messages {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: 90%;
    max-width: 500px;
    text-align: center;
}

.alert {
    padding: 15px 40px 15px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    position: relative;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.4s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.close-btn {
    cursor: pointer;
    font-size: 1.5rem;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.2s;
    background: none;
    border: none;
    padding: 0;
    margin-left: 10px;
}

.close-btn:hover {
    opacity: 1;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}
