
:root {
    --primary-color: #4285f4;
    --secondary-color: #34a853;
    --accent-color: #ea4335;
    --dark-color: #003366;
    --light-color: #f8f9fa;
    --text-color: #333;
    --text-light: #666;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: var(--text-color);
    line-height: 1.6;
}

nav {
    background-color: var(--dark-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.nav-links {
    display: flex;
    flex: 1;
    justify-content: flex-end; /* จัดให้ลิงก์ทั้งหมดชิดขวา */
}

/* จัดให้ลิงก์ Login อยู่ขวาสุด */
.nav-links #loginLink,
.nav-links #logoutLink {
    margin-left: auto;
}

nav a {
    display: flex;
    align-items: center;
    color: white;
    text-align: center;
    padding: 18px 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

nav a.active {
    background-color: var(--primary-color);
    font-weight: 500;
}

nav a.active:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 3px;
    background-color: white;
}

nav a i {
    margin-right: 8px;
    font-size: 0.9em;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
}

.header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 30px;
    margin-bottom: 40px;
    text-align: center;
    width: 100%;
    max-width: 600px;
}

.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 5px solid var(--light-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.profile-name {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.profile-bio {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.6;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.social-link {
    color: var(--primary-color);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    color: var(--dark-color);
    transform: translateY(-3px);
}

.contact-info {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 30px;
    margin-bottom: 40px;
    width: 100%;
    max-width: 600px;
}

.contact-info h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.contact-icon {
    width: 40px;
    height: 40px;
    background-color: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: var(--primary-color);
}

.contact-text {
    flex: 1;
}

.contact-text a {
    color: var(--primary-color);
    text-decoration: none;
}

.contact-text a:hover {
    text-decoration: underline;
}

footer {
    background-color: var(--dark-color);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 50px;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        justify-content: flex-start; /* ใน mobile ให้กลับมาแสดงแบบปกติ */

    }

    .nav-links #loginLink,
    .nav-links #logoutLink {
        margin-left: 0;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    nav a {
        padding: 12px;
        justify-content: center;
    }
    
    .nav-container {
        flex-direction: column;
        padding: 0px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .profile-card, .contact-info {
        padding: 20px;
    }

    .profile-img {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 30px 15px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .profile-name {
        font-size: 1.5rem;
    }
}
