:root {
    --primary: #403D88;
    --secondary: #8B639B;
    --accent: #AF719D;
    --light-pink: #F8B2B2;
    --bg-dark: #12101d;
    --text-main: #ffffff;
    --text-muted: #a79ebb;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', 'Kanit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Blobs */
.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.25;
    pointer-events: none;
    z-index: 0;
}

.blob-1 {
    background: var(--primary);
    top: -100px;
    left: -100px;
}

.blob-2 {
    background: var(--accent);
    top: 200px;
    right: -100px;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 5%;
    position: relative;
    z-index: 10;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.logo span {
    color: var(--light-pink);
}

.logo-icon {
    color: var(--accent);
    font-size: 1.3rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--text-main);
}

.btn-nav {
    background: var(--primary);
    color: #fff !important;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    transition: transform 0.3s, background 0.3s !important;
}

.btn-nav:hover {
    background: var(--secondary) !important;
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1.5rem 4rem;
    position: relative;
    z-index: 1;
}

.hero-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    width: 100%;
}

.hero-main-logo {
    width: 100%;
    max-width: 220px;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    object-fit: cover;
    filter: drop-shadow(0 10px 25px rgba(64, 61, 136, 0.4));
    transition: transform 0.3s ease;
}

.hero-main-logo:hover {
    transform: scale(1.05);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.4rem 1rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--light-pink);
    margin-bottom: 1.5rem;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent);
    border-radius: 50%;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 1rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--light-pink), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 3rem;
    width: 100%;
}

.btn-primary, .btn-secondary {
    padding: 0.8rem 1.6rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(64, 61, 136, 0.4);
}

.btn-primary:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Partner Section */
.partner-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    padding: 1rem 1.8rem;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.partner-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-muted);
    opacity: 0.8;
}

.partner-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.partner-logo {
    height: 38px;
    width: auto;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    object-fit: cover;
}

.partner-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.partner-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.partner-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Projects Section Styling */
.projects-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 1.5rem 5rem;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-tag {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: var(--accent);
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-top: 0.4rem;
}

.title-bar {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    margin: 0.8rem auto 0;
    border-radius: 2px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: rgba(248, 178, 178, 0.3);
    box-shadow: 0 12px 30px rgba(64, 61, 136, 0.3);
}

.project-poster {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #1a1728;
}

.project-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.project-card:hover .project-poster img {
    transform: scale(1.05);
}

.season-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.project-info {
    padding: 1.2rem;
    text-align: left;
}

.project-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.project-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Team Section Styling */
.team-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem 5rem;
    position: relative;
    z-index: 1;
}

.team-grid {
    display: flex;
    overflow-x: auto;
    gap: 1.2rem;
    padding: 1rem 0.5rem 1.8rem 0.5rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.team-grid::-webkit-scrollbar {
    height: 6px;
}

.team-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.team-grid::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.team-grid::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

.team-card {
    flex: 0 0 250px;
    scroll-snap-align: start;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.team-card:hover {
    transform: translateY(-8px);
    border-color: rgba(248, 178, 178, 0.4);
    box-shadow: 0 12px 30px rgba(64, 61, 136, 0.3);
}

.partner-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #AF719D, #403D88);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}

.team-avatar-box {
    width: 90px;
    height: 90px;
    margin-bottom: 0.8rem;
    position: relative;
}

.team-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.team-role {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--light-pink);
    letter-spacing: 1px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.3rem;
}

.team-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.team-short-bio {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-member-more {
    margin-top: auto;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    padding: 0.45rem 1rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Modal Overlay & Base Container */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 8, 20, 0.85);
    backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 15px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: #171426;
    border: 1px solid rgba(248, 178, 178, 0.2);
    width: 100%;
    max-width: 850px;
    max-height: 90vh;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    animation: modalPop 0.3s ease forwards;
}

@keyframes modalPop {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.member-modal-container {
    height: auto;
    max-height: 85vh;
    max-width: 480px;
}

.member-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.member-modal-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1.2rem;
    margin-bottom: 1.2rem;
}

.member-modal-avatar {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
}

.member-header-details h2 {
    font-size: 1.2rem;
    color: #ffffff;
    margin: 0.2rem 0 0.4rem;
}

.member-socials {
    display: flex;
    gap: 12px;
}

.member-socials a {
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.member-socials a:hover {
    color: var(--light-pink);
}

.member-detail-content {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.detail-block h4 {
    font-size: 0.88rem;
    color: var(--light-pink);
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-block p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.member-project-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.member-project-list li {
    font-size: 0.82rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.5rem 0.8rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.member-project-list li i {
    color: var(--accent);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10;
}

.modal-close:hover {
    color: #ffffff;
}

.modal-header {
    padding: 1.5rem 1.8rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-header h2 {
    font-size: 1.3rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h2 i {
    color: var(--accent);
}

.modal-header p {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-top: 5px;
}

.modal-body {
    padding: 1.5rem 1.8rem;
    overflow-y: auto;
    flex: 1;
}

.requirements-box {
    background: rgba(64, 61, 136, 0.15);
    border: 1px dashed var(--accent);
    padding: 1rem 1.2rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.requirements-box h3 {
    font-size: 0.9rem;
    color: var(--light-pink);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.requirements-box ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.requirements-box li {
    font-size: 0.82rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.requirements-box li i {
    color: #4cd137;
    font-size: 0.75rem;
}

.btn-apply {
    padding: 0.8rem 1.6rem;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #AF719D, #8B639B);
    color: #ffffff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(175, 113, 157, 0.4);
    transition: all 0.3s ease;
}

.apply-form .form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.required {
    color: #ff4757;
}

.form-group input,
.form-group select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 0.7rem 0.9rem;
    color: #ffffff;
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.3s;
}

.form-group select option {
    background: #171426;
    color: #ffffff;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--accent);
}

.form-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.btn-cancel {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-muted);
    padding: 0.65rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.btn-submit {
    background: var(--primary);
    border: none;
    color: #fff;
    padding: 0.65rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

/* Status Popup Overlay */
.status-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.status-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.status-popup-card {
    background: #1e1b2e;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    width: 90%;
    max-width: 360px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.spinner {
    width: 45px;
    height: 45px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.status-content h3 {
    color: #ffffff;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.status-content p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1.2rem;
}

.icon-success i {
    font-size: 3rem;
    color: #2ed573;
    margin-bottom: 0.8rem;
}

.icon-error i {
    font-size: 3rem;
    color: #ff4757;
    margin-bottom: 0.8rem;
}

.btn-popup-close {
    background: var(--primary);
    color: #ffffff;
    border: none;
    padding: 0.6rem 1.8rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
}

.btn-error-close {
    background: #ff4757;
}

/* Responsive Styles สำหรับหน้าจอมือถือ */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem 4%;
    }

    .nav-links {
        gap: 0.8rem;
        font-size: 0.8rem;
    }

    .nav-links a {
        font-size: 0.8rem;
    }

    .btn-nav {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
    }

    .btn-primary, .btn-secondary, .btn-apply {
        width: 100%;
    }

    .apply-form .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group.full-width {
        grid-column: span 1;
    }

    .modal-container {
        max-height: 92vh;
    }

    .modal-header {
        padding: 1.2rem 1.2rem 0.8rem;
    }

    .modal-body {
        padding: 1.2rem;
    }
}

@media (max-width: 480px) {
    .navbar {
        justify-content: center;
        text-align: center;
    }

    .nav-links {
        justify-content: center;
        width: 100%;
    }

    .member-modal-header {
        flex-direction: column;
        text-align: center;
    }

    .member-socials {
        justify-content: center;
    }
}