@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&family=Outfit:wght@400;600;800&display=swap');

:root {
    --bg-main: #060913;
    --bg-secondary: #0b1125;
    --bg-glass: rgba(14, 21, 46, 0.6);

    --primary: #5c3cff;
    --primary-glow: rgba(92, 60, 255, 0.6);
    --secondary: #2196f3;
    --secondary-glow: rgba(33, 150, 243, 0.5);

    --text-main: #f0f4f8;
    --text-muted: #a0a8cc;

    --border-color: rgba(92, 60, 255, 0.2);
    --border-highlight: rgba(92, 60, 255, 0.8);

    --radius: 16px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: 'Kanit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', 'Kanit', sans-serif;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}


.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    border-radius: var(--radius);
}


.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    z-index: 10;
}

main.content-wrapper {
    flex: 1;
    padding: 120px 20px 60px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    position: relative;
}


.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 15px 0;
    transition: var(--transition);
    background: rgba(6, 9, 19, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.site-header.scrolled {
    padding: 10px 0;
    background: rgba(6, 9, 19, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid var(--border-color);
}

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

.logo-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    z-index: 101;
}

.logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(90deg, #fff, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
}

.logo-image {
    max-height: 50px;
}

.nav-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.nav-item {
    font-size: 1rem;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 8px;
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
}

.nav-item:hover,
.nav-item.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    color: var(--secondary);
    background: rgba(33, 150, 243, 0.1);
    box-shadow: inset 0 0 0 1px var(--secondary-glow);
}

.nav-item i {
    font-size: 1.1rem;
}

.btn-login {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    color: white !important;
    box-shadow: 0 4px 15px var(--primary-glow);
    transition: var(--transition);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
    background: linear-gradient(135deg, #7155ff, #3fa2f6);
}

.btn-icon-only {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    transition: var(--transition);
}

.btn-icon-only:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateY(-2px);
}


.page-container {
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
    display: none;
}

.page-container.active {
    opacity: 1;
    transform: translateY(0);
    display: block;
    animation: fadeUp 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.hero-section {
    text-align: center;
    padding: 80px 0;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

.highlight {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px var(--primary-glow));
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 30px;
}


.search-container {
    max-width: 600px;
    margin: 0 auto 50px;
    position: relative;
    z-index: 20;
}

.search-input {
    width: 100%;
    padding: 18px 20px 18px 50px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    color: #fff;
    font-size: 1.1rem;
    font-family: inherit;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
    outline: none;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
}


.page-title {
    font-size: 2.5rem;
    text-align: left;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.page-title i {
    color: var(--primary);
    filter: drop-shadow(0 0 10px var(--primary-glow));
}

.rules-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rule-item {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.rule-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    opacity: 0;
    transition: var(--transition);
}

.rule-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 15px var(--primary-glow);
    border-color: var(--border-highlight);
}

.rule-item:hover::before {
    opacity: 1;
}

.rule-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #fff;
    font-weight: 600;
}

.rule-content {
    color: var(--text-muted);
    line-height: 1.6;
}


.text-content {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    line-height: 1.8;
}

.text-content h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.text-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
}


.site-footer {
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(6, 9, 19, 0.8);
    backdrop-filter: blur(10px);
    color: var(--text-muted);
    margin-top: auto;
}


.admin-login-box {
    max-width: 400px;
    margin: 50px auto;
    padding: 40px;
    text-align: center;
}

.admin-login-box h2 {
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #fff;
    outline: none;
    font-family: inherit;
}

.form-control:focus {
    border-color: var(--primary);
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.btn-primary:hover {
    box-shadow: 0 0 20px var(--primary-glow);
}


/* Accordion Rules */
.accordion-item {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 15px;
    overflow: hidden;
    color: #fff;
}
.accordion-header {
    padding: 20px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.3);
    font-size: 1.1rem;
    font-weight: 600;
    transition: var(--transition);
}
.accordion-header:hover {
    background: rgba(255,255,255,0.05);
}
.accordion-header i.fa-chevron-down {
    transition: transform 0.3s ease;
}
.accordion-item.active .accordion-header i.fa-chevron-down {
    transform: rotate(-180deg);
}
.accordion-item.active .accordion-header {
    border-bottom: 1px solid var(--border-color);
}
.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}
.accordion-content-inner {
    padding: 20px 25px;
}
.rule-item-box {
    background: rgba(255,255,255,0.03);
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 15px;
    border-left: 3px solid var(--primary);
    transition: var(--transition);
}
.rule-item-box:hover {
    background: rgba(255,255,255,0.06);
}
.rule-item-box h4 {
    margin: 0 0 10px 0;
    color: var(--primary);
    font-size: 1.1rem;
}
.rule-item-box:last-child {
    margin-bottom: 0;
}

@media (max-width: 991px) {
    .nav-links {
        display: none;
    }
}