* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #1C1B27;
} */

body {
    background: linear-gradient(180deg, #000000 0%, #001f2f 100%);
    color: #00ffff80;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

.flex-container {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100vh;
    padding: 0 5%;
    box-sizing: border-box;
    justify-content: center;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 101;
}

.flex-box {
    width: 40%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    margin-top: -50px;
}

/* กล่องซ้ายจัด content เป็น column */
.left-box {
    flex-direction: column;
    gap: 20px;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 30px;
    backdrop-filter: blur(15px);
}

.logo-img-brand, .login-brand-logo {
    width: 300px;
    filter: drop-shadow(0 0 15px rgba(0, 255, 255, 0.7));
}

/* กล่องขวา (รูปภาพ) */
.right-box {
    justify-content: center;
    align-items: center;
}

.logo-img-brand {
    width: 100%;
    max-width: 350px;
    height: auto;
    margin: 0;
    margin-bottom: -20px;
}

.dashboard-image {
    width: 100%;
    max-width: 500px;
    height: auto;
}

/* ปรับให้ description, button อยู่กึ่งกลางและชิดกัน */
.wel-description {
    color: #00ffff;
    font-size: 14px;
    text-align: center;
    max-width: 100%;
}

.get-start-btn {
    padding: 12px 10px;
    font-size: 1rem;
    text-decoration: none;
    font-weight: bold;
    color: #00ffff;
    border: 2px solid #00ffff;
    border-radius: 15px;
    background-color: transparent;
    transition: all 0.3s ease;
    text-align: center;
    width: 250px;
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.5);
    cursor: pointer;
}

.get-start-btn:hover {
    background-color: #00ffff80;
    color: #001f2f;
}

/* Responsive สำหรับ Tablet */
@media (max-width: 1024px) {
    .flex-container {
        flex-direction: column;
        height: auto;
        padding: 20px 5%;
        align-items: center;
        text-align: center;
    }

    .flex-box {
        width: 100%;
        justify-content: center;
        align-items: center;
        margin-bottom: 20px;
    }

    .left-box {
        align-items: center;
        text-align: center;
        gap: 15px;
    }

    .right-box {
        order: -1;
        width: 0%;
    }

    .logo-img-brand {
        max-width: 300px;
    }

    .dashboard-image {
        max-width: 350px;
    }

    .wel-description {
        font-size: 14px;
    }

    .get-start-btn {
        width: 200px;
        font-size: 0.9rem;
    }
}

/* Responsive สำหรับมือถือ */
@media (max-width: 768px) {
    .logo-img-brand {
        max-width: 250px;
    }

    .dashboard-image {
        max-width: 0px;
    }

    .wel-description {
        font-size: 12px;
    }

    .get-start-btn {
        width: 180px;
        font-size: 0.85rem;
    }
}

.welcome-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    text-align: center;
}

.login-brand-logo {
    width: 100%;
    max-width: 250px;
    padding-bottom: 20px;
    height: auto;
    margin: 0;
}

.login-section {
    width: 100%;
    max-width: 400px;
    color: white;
    display: none;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    text-align: center;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 255, 255, 0.7);
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.7);
    padding: 30px;
    border-radius: 15px;
    backdrop-filter: blur(15px);
}

.login-section h2 {
    color: #001f2f;
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: bold;
}

.login-section input {
    width: 100%;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 255, 0.7);
    border-radius: 5px;
    color: #00ffff;
    outline: none;
}

.login-section input::placeholder {
    color: rgba(0, 255, 255, 0.7);
}

.login-links {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 14px;
    color: rgba(0, 255, 255, 0.7);
}

.login-links a {
    color: #00ffffec;
    text-decoration: none;
    transition: 0.3s;
}

.login-links .forgot {
    color: #00ffffec;
}

.login-links .signup {
    color: #00ffffec;
}

.login-links a:hover {
    opacity: 0.5;
    color: #c6ffff;
}

.login-section button {
    width: 100%;
    padding: 12px;
    background-color: #00ffff;
    border: none;
    border-radius: 5px;
    color: #1C1B27;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    font-size: 16px;
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.7);
}

.login-section button:hover {
    background-color: #c6ffff;
}

@media (max-width: 480px) {
    .login-section {
        width: 90%;
        padding: 20px;
    }
}

.aurora {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 100;
    opacity: 0.2;
}

#up {
    position: absolute;
    height: 800px;
    width: 800px;
    border-radius: 50%;
    background-image: linear-gradient(80deg, rgba(0, 255, 255, 0.8), rgba(0, 255, 255, 0));
    filter: blur(80px);
    animation: down 40s infinite;
}

#down {
    position: absolute;
    right: 0;
    height: 500px;
    width: 500px;
    border-radius: 50%;
    background-image: linear-gradient(80deg, rgba(0, 255, 255, 0.8), rgba(0, 255, 255, 0));
    filter: blur(80px);
    animation: up 30s infinite;
}

#left {
    position: absolute;
    height: 500px;
    width: 500px;
    border-radius: 50%;
    background-image: linear-gradient(80deg, rgba(0, 255, 255, 0.8), rgba(0, 255, 255, 0));
    filter: blur(80px);
    animation: left 30s 2s infinite;
}

#right {
    position: absolute;
    height: 500px;
    width: 500px;
    border-radius: 50%;
    background-image: linear-gradient(80deg, rgba(0, 255, 255, 0.8), rgba(0, 255, 255, 0));
    filter: blur(80px);
    animation: right 40s 1s infinite;
}

@keyframes down {
    0%, 100% {
        top: -100px;
    }
    70% {
        top: 700px;
    }
}

@keyframes down {
    0%, 100% {
        bottom: -100px;
    }
    70% {
        bottom: 700px;
    }
}

@keyframes left {
    0%, 100% {
        left: -100px;
    }
    70% {
        left: 1300px;
    }
}

@keyframes right {
    0%, 100% {
        right: -100px;
    }
    70% {
        right: 1300px;
    }
}

/* #earth {
	position: relative;
	width: 500px;
	height: 500px;
	border-radius: 50%;
	background: transparent url("assets/images/earth-map.png");
	background-size: cover;
	box-shadow: inset 0px -20px 50px 10px #00ffff80,
        0px 0px 30px 6px #00ffff70;
	transform-style: preserve-3d;
	transform: rotate(20deg);
	animation: rotate 30s linear infinite;
}

@keyframes rotate {
	0% {
		background-position: 0 0;
	}

	100% {
		background-position: 530px 0;
	}
} */

/* #earth {
    position: relative;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: transparent url("assets/images/earth-map.png");
    background-size: cover;
    box-shadow: inset 0px -20px 50px 10px #00ffff80,
        0px 0px 30px 6px #00ffff70;
    transform-style: preserve-3d;
    transform: rotateX(15deg);
    animation: earthRotate 60s linear infinite;
}

@keyframes earthRotate {
    from {
        transform: rotateX(15deg) rotate(0deg);
    }
    to {
        transform: rotateX(15deg) rotate(360deg);
    }
} */

#earth-container {
    position: relative;
    width: 500px;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#earth {
    position: relative;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: transparent url("assets/images/earth-map.png");
    background-size: cover;
    box-shadow: inset 0px -20px 50px 10px #00ffff80,
        0px 0px 30px 6px #00ffff70;
    transform-style: preserve-3d;
    transform: rotateX(15deg);
    animation: earthRotate 150s linear infinite;
}

/* แสงพระอาทิตย์ */
#earth::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    /* background: radial-gratedient(circle at 30% 30%, rgba(255, 255, 255, 0.5), rgba(0, 0, 0, 0.7) 70%); */
    pointer-events: none;
}

/* Glow รอบโลก */
#earth::before {
    content: "";
    position: absolute;
    top: -10px;
    left: -10px;
    width: calc(100% + 20px);
    height: calc(100% + 20px);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.5), rgba(0, 255, 255, 0) 60%);
    pointer-events: none;
    animation: pulsate 5s infinite alternate;
}

@keyframes pulsate {
    from { opacity: 0.6; transform: scale(1); }
    to { opacity: 0.8; transform: scale(1); }
}

/* วงโคจรรอบโลก */
.orbit {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    border: 1px dashed rgba(0, 255, 255, 0.3);
    animation: rotateOrbit 30s linear infinite;
    pointer-events: none;
}

.orbit:nth-child(2) {
    width: 550px;
    height: 550px;
    animation-duration: 20s;
}

@keyframes rotateOrbit {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* หมุนโลก */
@keyframes earthRotate {
    from { transform: rotateX(15deg) rotate(0deg); }
    to { transform: rotateX(15deg) rotate(360deg); }
}

/* ดาวพื้นหลัง */
body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.9) 100%),
                url('https://www.transparenttextures.com/patterns/stardust.png'); /* ดาวจางๆ */
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

/* Particles container */
.particles-container {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

/* ดาวเทียมเล็กๆ โคจรรอบโลก */
.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(0, 255, 255, 0.8);
    border-radius: 50%;
    animation: orbitSatellite linear infinite;
    filter: drop-shadow(0 0 6px rgba(0, 255, 255, 0.8));
}

/* สร้างดาวเทียมหลายดวง */
.particles-container .particle:nth-child(1) {
    top: 20%;
    left: 50%;
    animation-duration: 12s;
}

.particles-container .particle:nth-child(2) {
    top: 60%;
    left: 80%;
    animation-duration: 15s;
}

.particles-container .particle:nth-child(3) {
    top: 30%;
    left: 10%;
    animation-duration: 18s;
}

.particles-container .particle:nth-child(4) {
    top: 70%;
    left: 30%;
    animation-duration: 22s;
}

/* ดาวกระพริบ */
@keyframes orbitSatellite {
    0% { transform: rotate(0deg) translateX(300px) rotate(0deg); opacity: 1; }
    50% { opacity: 0.5; }
    100% { transform: rotate(360deg) translateX(300px) rotate(-360deg); opacity: 1; }
}

/* เพิ่มดาวกระพริบรอบๆ (อาจใช้ pseudo-elements หรือ canvas ก็ได้) */
.star {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite alternate;
}

.star:nth-child(odd) {
    animation-duration: 2s;
}

@keyframes twinkle {
    from { opacity: 0.2; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1.2); }
}
