/* ===== RESET ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Prompt', 'Segoe UI', sans-serif;
    background: #0a0a0f;
    color: #c8c8c8;
    line-height: 1.6;
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
a { text-decoration: none; color: inherit; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0a0a0f; }
::-webkit-scrollbar-thumb { background: #d4af37; border-radius: 3px; }

/* ===== NAVBAR ===== */
.navbar {
    background: rgba(10, 10, 15, 0.95);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(212, 175, 55, 0.08);
    backdrop-filter: blur(12px);
}
.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo img { height: 40px; }
.logo span {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: #d4af37;
    letter-spacing: 1px;
}
.logo small {
    font-size: 0.5rem;
    color: #888;
    letter-spacing: 4px;
}
.nav-links {
    list-style: none;
    display: flex;
    gap: 28px;
}
.nav-links a {
    color: #888;
    font-size: 0.9rem;
    font-weight: 400;
    transition: 0.3s;
    letter-spacing: 1px;
}
.nav-links a:hover,
.nav-links a.active { color: #d4af37; }
.hamburger { display: none; font-size: 1.6rem; cursor: pointer; color: #fff; }

/* ===== HERO ===== */
.hero {
    padding: 60px 0;
    text-align: center;
    background: #0a0a0f;
}
.hero-badge {
    display: inline-block;
    background: rgba(212, 175, 55, 0.06);
    border: 1px solid rgba(212, 175, 55, 0.08);
    padding: 6px 20px;
    border-radius: 50px;
    font-size: 0.7rem;
    color: #d4af37;
    letter-spacing: 3px;
    margin-bottom: 16px;
}
.hero h1 {
    font-size: 3rem;
    font-weight: 300;
    color: #fff;
}
.hero h1 span {
    font-weight: 700;
    background: linear-gradient(135deg, #d4af37, #f5d77b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p { color: #777; font-size: 1rem; margin-top: 8px; }
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 28px;
}
.hero-stats .num {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #d4af37;
}
.hero-stats label {
    font-size: 0.8rem;
    color: #555;
    letter-spacing: 1px;
}
@media (max-width: 768px) {
    .hero {
        padding: 30px 0;  /* ✅ ลดจาก 60px เป็น 30px */
    }
    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 8px;
    }
    .hero-content p {
        font-size: 0.9rem;
        margin-bottom: 16px;
    }
    .hero-stats {
        gap: 20px;
        margin-top: 20px;
    }
    .hero-stats .num {
        font-size: 1.4rem;
    }
    .hero-stats label {
        font-size: 0.7rem;
    }
    .hero-badge {
        padding: 4px 16px;
        font-size: 0.6rem;
        margin-bottom: 12px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 20px 0;  /* ✅ ลดลงอีกสำหรับจอเล็ก */
    }
    .hero-content h1 {
        font-size: 1.6rem;
    }
    .hero-stats {
        gap: 16px;
    }
}

/* ===== SECTION HEADER ===== */
.section-header {
    text-align: center;
    margin-bottom: 7px;
}
.items-subtitle {
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 2px;
    margin-bottom: 16px;
    text-transform: uppercase;
}
.section-tag {
    color: #d4af37;
    font-size: 0.7rem;
    letter-spacing: 4px;
    font-weight: 500;
}
.section-header h2 {
    font-size: 2rem;
    font-weight: 300;
    color: #fff;
}
.section-header p {
    color: #666;
    font-size: 0.95rem;
    font-weight: 300;
}
@media (max-width: 768px) {
    .section-header p {
        font-size: 0.75rem;
    }
}

/* ===== MEMBERS GRID ===== */
.members-section {
    padding: 40px 0 60px;
    background: #0f0f18;
}
@media (max-width: 768px) {
    .members-section {
        padding: 10px 0 20px;
    }
}
.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

/* ===== MEMBER CARD ===== */
.member-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 16px 20px;
    transition: 0.3s;
}
.member-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(212, 175, 55, 0.08);
    transform: translateY(-2px);
}
.member-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d4af37;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.member-info { flex: 1; min-width: 0; }
.member-name {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.member-name h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
}
.member-detail {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: #888;
    margin-top: 2px;
}
.member-detail i { color: #555; width: 16px; }
.member-characters {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}
.char-tag {
    font-size: 0.6rem;
    background: rgba(255, 255, 255, 0.03);
    color: #666;
    padding: 0 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

/* ===== BUTTONS ===== */
.btn-alt, .btn-edit, .btn-delete {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
    color: #666;
    font-size: 0.7rem;
    cursor: pointer;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-alt:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.2);
    color: #d4af37;
}
.btn-edit:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.btn-delete:hover {
    background: rgba(255, 0, 0, 0.08);
    border-color: rgba(255, 0, 0, 0.15);
    color: #ff4444;
}

/* ===== ADD MEMBER CARD ===== */
.add-member-card {
    border: 1px dashed rgba(255, 255, 255, 0.06);
    cursor: pointer;
    justify-content: center;
}
.add-member-card:hover {
    border-color: rgba(212, 175, 55, 0.2);
    background: rgba(212, 175, 55, 0.02);
}

/* ===== ITEMS SECTION ===== */
.items-section {
    padding: 40px 0 40px;
    background: #0a0a0f;
}
.items-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 800px;
    margin: 0 auto;
}
.item-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 50px;
    color: #c8c8c8;
    font-size: 0.85rem;
    font-weight: 500;
    transition: 0.3s;
    letter-spacing: 1px;
}
.item-btn:hover {
    background: rgba(212, 175, 55, 0.08);
    border-color: rgba(212, 175, 55, 0.3);
    color: #d4af37;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.15);
}
@media (max-width: 768px) {
	.items-section {
	    padding: 10px 0 20px !important;
	}
	.items-grid {
	    gap: 5px !important;
	}
	.item-btn {
	    padding: 4px 10px !important;
	    font-size: 0.65rem !important;
	    border-radius: 30px !important;
	    min-width: auto !important;
	}
}

/* ===== ABOUT ===== */
.about-section {
    padding: 40px 0 60px;
    background: #0a0a0f;
}
@media (max-width: 768px) {
	.about-section {
        padding: 10px 0 10px !important;;
    }
}
.about-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    padding: 24px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.02);
}
.about-box h2 {
    font-size: 1.6rem;
    font-weight: 300;
    color: #fff;
}
.about-box p {
    color: #777;
    font-size: 0.95rem;
    font-weight: 300;
}
.about-social {
    display: flex;
    gap: 12px;
}
.about-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    transition: 0.3s;
}
.about-social a:hover {
    background: rgba(212, 175, 55, 0.06);
    color: #d4af37;
}

/* ===== FOOTER ===== */
.footer {
    background: #08080c;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.02);
    text-align: center;
    color: #444;
    font-size: 0.8rem;
}

/* ===== MODAL ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999;
    justify-content: center;
    align-items: center;
	pointer-events: none; /* ห้ามคลิกพื้นหลัง */
}
.modal-overlay.active {
    display: flex;
    pointer-events: auto;
}

.modal {
    background: #1a1a24;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    max-width: 500px;
    width: 92%;
    padding: 0;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
    animation: modalFadeIn 0.22s ease-out;
    pointer-events: auto;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 500;
    color: #fff;
    margin: 0;
}
.modal-header h3 i {
    color: #d4af37;
    margin-right: 8px;
}
.modal-close {
    background: none;
    border: none;
    color: #666;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s;
    padding: 4px 8px;
    border-radius: 4px;
}
.modal-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

.modal-body {
    padding: 24px 24px 12px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* ===== FORM ===== */
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 4px;
    font-weight: 500;
}
.form-group input[type="text"],
.form-group input[type="number"] {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    color: #fff;
    font-size: 0.95rem;
    font-family: inherit;
    transition: 0.3s;
}
.form-group input:focus {
    outline: none;
    border-color: rgba(212, 175, 55, 0.3);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.05);
}
.form-group input::placeholder {
    color: #444;
}
.form-group small {
    display: block;
    color: #555;
    font-size: 0.7rem;
    margin-top: 4px;
}

/* ===== BUTTONS IN MODAL ===== */
.btn-cancel {
    padding: 8px 20px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    color: #888;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.3s;
    font-family: inherit;
}
.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
}

.btn-save {
    padding: 8px 24px;
    background: linear-gradient(135deg, #d4af37, #b8962c);
    border: none;
    border-radius: 8px;
    color: #0a0a0f;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.3s;
    font-family: inherit;
}
.btn-save:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.2);
}

/* ===== RADIO ===== */
.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 4px;
}
.radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: #c8c8c8;
    font-weight: 400;
    font-size: 0.9rem;
}
.radio-group input[type="radio"] {
    accent-color: #d4af37;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ===== RESPONSIVE 768px ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        background: #0a0a0f;
        position: absolute;
        top: 64px;
        left: 0;
        width: 100%;
        padding: 20px 24px 28px;
        gap: 14px;
        border-bottom: 1px solid rgba(212, 175, 55, 0.06);
    }
    .nav-links.active { display: flex; }
    .hamburger { display: block; }

    .hero h1 { font-size: 2.2rem; }
    .hero-stats { gap: 24px; }
    .hero-stats .num { font-size: 1.6rem; }
    .section-header h2 { font-size: 1.6rem; }

    .members-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .member-card {
        padding: 14px 16px;
        flex-wrap: wrap;
    }
    .member-avatar {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
    .member-name h3 { font-size: 0.85rem; }
    .member-detail {
        font-size: 0.7rem;
        gap: 12px;
        flex-wrap: wrap;
    }
    .char-tag { font-size: 0.55rem; }

    .about-box {
        flex-direction: column;
        text-align: center;
    }
    .about-box h2 { font-size: 1.3rem; }

    .modal { width: 95%; }
    .modal-body { padding: 16px; }
    .modal-header { padding: 16px; }
    .modal-footer { padding: 12px 16px 16px; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.8rem; }
    .hero-stats {
        gap: 16px;
        flex-wrap: wrap;
    }
    .hero-stats .num { font-size: 1.4rem; }
    .member-card {
        padding: 12px 14px;
        gap: 12px;
    }
    .modal-body { padding: 12px; }
    .modal-header { padding: 12px 16px; }
    .modal-footer { padding: 12px 16px; }
}
