/* dark modern theme */
:root {
    --bg-color: #121212;
    --card-color: rgba(31,31,31,0.85);
    --text-color: #e0e0e0;
    --accent-color: #bb86fc;
    --accent-hover: #9a67ea;
    --input-bg: rgba(44,44,44,0.9);
    --input-border: #444;
}

/* reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto; /* page scroll enabled */
}

/* animated gradient background + extra particles */
.bg-shapes {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 25% 25%, #2e004f, #000),
                radial-gradient(circle at 75% 75%, #000, #1a001f);
    animation: bgpan 20s linear infinite;
    z-index: -1;
}

/* small glowing particles */
.bg-shapes::before,
.bg-shapes::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(187,134,252,0.5);
    border-radius: 50%;
    animation: drift 12s infinite alternate;
}
.bg-shapes::after {
    top: 40%;
    left: 70%;
    animation-duration: 18s;
    background: rgba(154,103,234,0.5);
}
@keyframes drift {
    to { transform: translate(300px, 300px); }
}

@keyframes bgpan {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

header {
    text-align: center;
    margin-bottom: 24px;
    position: relative;
}
header .header-controls {
    position: absolute;
    top: 10px;
    right: 10px;
}
header .header-controls button {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}
header .header-controls button:hover {
    color: var(--accent-color);
}
header h1 {
    font-size: 2.2rem;
    margin-bottom: 8px;
    letter-spacing: 1px;
    animation: float 3s ease-in-out infinite;
}
header .subtitle.neon {
    color: #bb86fc;
    text-shadow: 0 0 6px #bb86fc, 0 0 12px #9a67ea;
}
header p {
    font-size: 1rem;
    color: #bbb;
}

@keyframes float {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.container {
    position: relative;
    background: var(--card-color);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 48px 36px 60px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.7);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.container .gradient-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    border-image: linear-gradient(45deg, #bb86fc, #9a67ea, #bb86fc) 1;
    pointer-events: none;
    animation: borderglow 4s linear infinite;
}
@keyframes borderglow {
    0% { border-image: linear-gradient(45deg, #bb86fc, #9a67ea, #bb86fc) 1; }
    50% { border-image: linear-gradient(45deg, #9a67ea, #bb86fc, #9a67ea) 1; }
    100% { border-image: linear-gradient(45deg, #bb86fc, #9a67ea, #bb86fc) 1; }
}


.form-group {
    margin-bottom: 20px;
    position: relative;
}
.form-group label i {
    margin-right: 6px;
    color: var(--accent-color);
}


input, select {
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.1s;
}
input:focus, select:focus {
    transform: scale(1.02);
}

/* submit button pulse */
#submitBtn {
    animation: pulse 3s infinite;
}
@keyframes pulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(187,134,252,0.7); }
    50% { box-shadow: 0 0 0 10px rgba(187,134,252,0); }
}

/* refined container shadow */
.container {
    box-shadow: 0 12px 40px rgba(0,0,0,0.8), inset 0 0 20px rgba(0,0,0,0.5);
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.95rem;
}
.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus,
.form-group select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 8px var(--accent-color);
    outline: none;
}

/* server options toggles */
.server-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.server-options label {
    background: var(--input-bg);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    font-weight: 500;
}
.server-options input {
    display: none;
}
.server-options input:checked + span {
    background: var(--accent-color);
    color: #fff;
}
.server-options span {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background-color 0.2s, color 0.2s;
}
.server-options input:not(:checked) + span:hover {
    background: var(--accent-hover);
    color: #fff;
}
.form-group input::placeholder {
    color: #777;
}

button {
    margin-top: 12px;
    width: 100%;
    padding: 14px 0;
    border: none;
    border-radius: 8px;
    background-color: var(--accent-color);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: background-color 0.2s, transform 0.1s;
}
button:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}
button:active {
    transform: translateY(1px);
}

#toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #222;
    color: #fff;
    padding: 14px 24px;
    border-radius: 6px;
    opacity: 0;
    font-weight: 500;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(24px);
    backdrop-filter: blur(4px);
}
#toast.visible {
    opacity: 1;
    transform: translateY(0);
}
#toast.hidden {
    display: none;
}

footer {
    margin-top: 40px;
    color: #666;
    font-size: 0.85rem;
    text-align: center;
}
.footer .tiny {
    font-size: 0.7rem;
    color: #555;
}

.info-section {
    max-width: 480px;
    text-align: center;
    margin-bottom: 32px;
    padding: 0 20px;
    color: #ccc;
    font-style: italic;
}

.extras {
    display: flex;
    gap: 20px;
    margin-bottom: 32px;
    align-items: center;
}
.extras .clock {
    font-size: 1.6rem;
    background: var(--input-bg);
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(187,134,252,0.5);
}
.extras .quote {
    font-size: 1rem;
    flex: 1;
    text-align: center;
    color: #bbb;
}

/* 3D cube */
.cube {
    width: 60px;
    height: 60px;
    position: relative;
    transform-style: preserve-3d;
    animation: spincube 8s infinite linear;
    margin-left: 20px;
}

/* responsive tweaks */
@media (max-width: 480px), (max-height: 700px) {
    header h1 { font-size: 1.6rem; }
    header .subtitle { font-size: 0.85rem; }
    .info-section { display: none; }
    .extras { flex-direction: column; gap: 10px; }
    .extras .clock { font-size: 1.2rem; padding: 6px 14px; }
    .cube { display: none; }
        .form-group input, .form-group select { padding: 8px 10px; }
    .container { padding: 18px 16px 24px; }
    footer { font-size: 0.75rem; }
}
.face {
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--accent-color);
    opacity: 0.8;
    border: 1px solid #000;
}
.face.front  { transform: translateZ(30px); }
.face.back   { transform: rotateY(180deg) translateZ(30px); }
.face.right  { transform: rotateY(90deg) translateZ(30px); }
.face.left   { transform: rotateY(-90deg) translateZ(30px); }
.face.top    { transform: rotateX(90deg) translateZ(30px); }
.face.bottom { transform: rotateX(-90deg) translateZ(30px); }
@keyframes spincube {
    from { transform: rotateX(0) rotateY(0); }
    to   { transform: rotateX(360deg) rotateY(360deg); }
}


/* confetti */
.confetti {
    position: fixed;
    top: -10px;
    font-size: 1.4rem;
    animation: fall linear;
    pointer-events: none;
    opacity: 0.9;
}
@keyframes fall {
    to { transform: translateY(110vh) rotate(360deg); opacity: 0; }
}

/* mouse trail dots */
.trail-dot {
    position: fixed;
    width: 6px;
    height: 6px;
    background: var(--accent-color);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.7;
    animation: trailfade 0.8s forwards;
}
@keyframes trailfade {
    to { transform: scale(0); opacity: 0; }
}
