/* Body: Lineage II-themed background */
body {
    font-family: 'Roboto', sans-serif;
    background: url('../video/BackgroundNew.mp4') no-repeat center center fixed;
    background-size: cover;
    color: #FFFFFF;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* Dark overlay for readability */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1;
}

/* Background video */
#background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures video covers the screen */
    z-index: -1; /* Places video behind content */
}

/* Container: Main wrapper */
.container {
    position: relative;
    z-index: 2;
    background: rgba(44, 44, 44, 0.9);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
    width: 90%;
    max-width: 400px;
    text-align: center;
    border: 2px solid #FFD700;
}

/* Slow-moving image inside container */
.container::before {
	content: '';
	position: absolute;
	top: 0;
	left: 620;
	width: 110%; /* Slightly larger for movement */
	height: 110%;
	background: url('../img/LoginShooter.png') no-repeat center center;
	background-size: contain;
	animation: moveBackground 30s linear infinite; /* Slow animation */
	z-index: -1; /* Behind form content */
	opacity: 0.9;
}

/* Keyframes for slow movement */
@keyframes moveBackground {
	0% {
		transform: translate(0, 0) scale(1);
	}
	50% {
		transform: translate(-5%, -20%) scale(1.05);
	}
	100% {
		transform: translate(0, 0) scale(1);
	}
}

/* Button */
button {
    width: 100%;
    padding: 0.8rem;
    background: #FFD700;
    color: #1A1A1A;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.1rem;
    font-weight: bold;
    transition: background 0.3s, transform 0.2s;
    touch-action: manipulation;
}

button:hover {
    background: #E6C200;
    transform: scale(1.05);
}
button:hover {
    background-color: #e6c200;
}

/* Server Status */
.server-status {
    margin: 1rem 0;
}

.server-status table {
    margin: 0 auto;
    border-collapse: collapse;
    color: #FFFFFF;
    font-family: 'Roboto', sans-serif;
}

.server-status td {
    padding: 0.5rem;
    text-align: left;
    font-size: 1rem;
}

.server-status img {
    max-width: 50px;
    vertical-align: middle;
}

/* Replace inline font colors */
.server-status font[color="White"], font[color="white"] {
    color: #FFFFFF;
}

.server-status font[color="Yellow"], font[color="yellow"] {
    color: #FFD700;
}

.server-status font[color="Red"], font[color="red"] {
    color: #FF0000;
}

.server-status font[color="green"] {
    color: #00FF00;
}

/* Uptime */
.uptime {
    margin: 1rem 0;
    font-size: 1rem;
    color: #FF55FF;
    font-family: 'Roboto', sans-serif;
}

.uptime-unit {
    display: inline;
}

.uptime-days {
    color: #FFEBCD; /* Same as .uptime for consistency */
}

.uptime-hours {
    color: #FFEBCD;
}

.uptime-minutes {
    color: #FFEBCD;
}

.uptime-seconds {
    color: #FFEBCD;
}

/* Style for the server-message div */
.server-message p {
    font-size: 1rem;
    margin: 0.5rem 0;
    color: #FFEBCD !important;
}

/* Headings */
h1, h2 {
    font-family: 'Cinzel Decorative', serif;
    color: #FFD700;
    font-size: 1.8rem; /* Reduced default to avoid oversized base */
    margin-bottom: 1.5rem;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
}

h3 {
    font-family: 'Cinzel Decorative', serif;
    color: #B22222;
    font-size: 1.5rem;
    margin: 1rem 0;
}

label {
    display: block;
    margin: 0.5rem 0;
    text-align: left;
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.1rem;
    color: #BBBBBB;
}

/* Replace inline label colors */
label font[color="Violet"], label font[color="violet"] {
    color: #EE82EE;
}

label font[color="SpringGreen"], label font[color="springgreen"] {
    color: #00FF7F;
}

/* Inputs */
input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #444;
    border-radius: 5px;
    background: #333;
    color: #FFFFFF;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
    box-sizing: border-box;
    touch-action: manipulation;
}

input:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

/* Password Container */
.password-container {
    position: relative;
    margin-bottom: 15px;
}

.password-container input {
    padding-right: 2.5rem;
}

/* Eye Icon */
.eye-icon {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #FFD700;
    font-size: 1.2rem;
    padding: 0.5rem;
}

.eye-icon:hover {
    color: #E6C200;
}

/* reCAPTCHA */
.g-recaptcha {
    display: inline-block; /* Ensure it can be centered */
    text-align: center; /* Center the widget */
}

/* Error message styling */
.error-message {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%); /* Center horizontally and vertically */
	background-color: rgba(0, 0, 0, 0.8); /* Semi-transparent black background */
	color: #FFD700; /* Magenta, matching other elements */
	padding: 1rem 2rem;
	border-radius: 5px;
	font-size: 1.5rem;
	font-family: 'Cinzel Decorative', sans-serif;
	z-index: 10; /* Ensure it appears above other elements */
	text-align: center;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
	display: none; /* Hidden by default *//* Existing styles */
    cursor: pointer; /* Indicates the div is clickable */
}

/* Button */
button {
    width: 100%;
    padding: 0.8rem;
    background: #FFD700;
    color: #1A1A1A;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.1rem;
    font-weight: bold;
    transition: background 0.3s, transform 0.2s;
    touch-action: manipulation;
}

button:hover {
    background: #E6C200;
    transform: scale(1.05);
}

/* Messages (for potential PHP/JS alerts) */
.message {
    margin-top: 1rem;
    color: #FF5555;
    font-size: 0.9rem;
    font-family: 'Roboto', sans-serif;
}

.success {
    margin-top: 1rem;
    color: #55FF55;
    font-size: 0.9rem;
    font-family: 'Roboto', sans-serif;
}

/* Link Panel */
.link {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.link p {
    margin: 0;
}

.link a {
    color: #FFD700;
    text-decoration: none;
    font-size: 0.9rem;
    font-family: 'Roboto', sans-serif;
    display: inline-block;
}

.link a:hover {
    color: #E6C200;
    text-decoration: underline;
}

.link font[color="Olive"], .link font[color="olive"] {
    color: #808000;
}

/* Phone-Specific Media Queries */
/* Very Small Phones (until 360px width) */
@media (min-width: 240px) and (max-width: 320px) {
    .container {
        padding: 0.8rem;
        border-width: 1px;
    }

    /* Consolidated pseudo-elements for panels */
    body.panel-login .container::before,
    body.panel-register .container::before,
    body.panel-password .container::before {
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0.3;
    }

    body.panel-inside .container::before {
        top: 30;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0.3;
    }

    /* Typography */
    h1, h2 {
        font-size: 1rem !important; /* Tiny for JioPhone 2 */
        text-align: center;
        margin: 0.3rem 0;
    }

    h3 {
        font-size: 0.9rem !important;
        margin: -1.3rem 0 0 0; /* 1rem top, 2rem bellow */
    }

    /* Server status table */
    .server-status td {
        font-size: 0.7rem; /* Very small for tiny screen */
    }

    .server-status img {
        max-width: 20px; /* Tiny images */
    }

    .uptime {
        font-size: 0.7rem;
        margin: -0.05rem 0 0 0; /* 1rem top, 2rem bellow */
    }

    /* Form elements */
    label {
        font-size: 0.8rem;
        display: block; /* Stack for clarity */
        margin-bottom: 2px;
    }

    input {
        padding: 0.4rem; /* Minimal padding */
        font-size: 0.7rem;
        width: 100%; /* Full width */
        box-sizing: border-box;
        margin-bottom: 4px;
    }

    .eye-icon {
        font-size: 0.8rem; /* Tiny icon */
        position: absolute;
        right: 5px;
        top: 45%;
        transform: translateY(-45%);
    }

    button {
        padding: 0.4rem; /* Minimal but usable */
        font-size: 0.7rem;
        width: 100%; /* Full width */
        min-height: 32px; /* Smaller touch/keypad target for KaiOS */
        background-color: #007bff;
        color: white;
        border-radius: 3px;
        cursor: default; /* KaiOS uses keypad, not cursor */
        margin: 0.05rem 0 0 0; /* 1rem top, 2rem bellow */
    }

    /* CAPTCHA (may not work well on JioPhone 2) */
    .g-recaptcha {
        transform: scale(0.4); /* Reduced size for JioPhone 2 */
        transform-origin: 0 0; /* Align to top-left for scaling */
        position: absolute;
        left: 25%;
        transform: scale(0.4); /* Combine centering and scaling */
        display: inline-block; /* Ensure proper width */
        margin: -1rem 0 0.3rem 0; /* 1rem top, 2rem bellow */
    }

    /* Messages and links */
    .message, .success {
        font-size: 0.6rem;
    }

    .link a {
        font-size: 0.7rem;
        color: #007bff;
        text-decoration: underline;
        margin: -0.3rem 0 0 0; /* 1rem top, 2rem bellow */
    }
}

/* Small to Mid-Range Phones (361px, 428px width, iPhone 14,16 Pro Max) */
@media (min-width: 361px) and (max-width: 428px) {
    .container {
        width: 90%;
        padding: 0.8rem;
        border-width: 1px;
    }
	
	body.panel-login .container::before {
		top: 50;
		left: 0;
        width: 100%;
        height: 100%;
		opacity: 0.3;
	}
	
	body.panel-register .container::before {
		top: 50;
		left: 0;
        width: 100%;
        height: 100%;
		opacity: 0.3;
	}
	
	body.panel-inside .container::before {
		top: 30;
		left: 0;
        width: 100%;
        height: 100%;
		opacity: 0.3;
	}
	
	body.panel-password .container::before {
		top: 50;
		left: 0;
        width: 100%;
        height: 100%;
		opacity: 0.3;
	}
	
    .g-recaptcha {
        transform-origin: center; /* Scale from the center */
        margin: -0.5rem 0 0.3rem 0; /* 1rem top, 2rem bellow */
    }
}

/* Larger Phones and Small Tablets (429px, 600px width) */
@media (min-width: 429px) and (max-width: 600px) {
    .container {
        width: 90%;
        padding: 0.8rem;
        border-width: 1px;
    }
	
	body.panel-login .container::before {
		top: 50;
		left: 0;
        width: 100%;
        height: 100%;
		opacity: 0.3;
	}
	
	body.panel-register .container::before {
		top: 50;
		left: 0;
        width: 100%;
        height: 100%;
		opacity: 0.3;
	}
	
	body.panel-inside .container::before {
		top: 30;
		left: 0;
        width: 100%;
        height: 100%;
		opacity: 0.3;
	}
	
	body.panel-password .container::before {
		top: 50;
		left: 0;
        width: 100%;
        height: 100%;
		opacity: 0.3;
	}
}

/* 720p (1280x720, ~1280px width) */
@media (min-width: 855px) and (max-width: 1280px) {
    .container {
        max-width: 400px;
        padding: 1.8rem;
    }
	
	body.panel-login .container::before {
		top: 70;
		left: 450;
        width: 100%;
        height: 100%;
        max-width: 600px;
        max-height: 600px;
	}
	
	body.panel-register .container::before {
		top: 90;
		left: 450;
        width: 100%;
        height: 100%;
        max-width: 600px;
        max-height: 600px;
	}
	
	body.panel-inside .container {
		max-width: 480px;
	}
	
	body.panel-inside .container::before {
		top: -60;
		left: 400;
        width: 200%;
        height: 200%;
        max-width: 600px;
        max-height: 600px;
	}
	
	body.panel-password .container {
		max-width: 580px;
	}
	
	body.panel-password .container::before {
		top: 50;
		left: 560;
        width: 100%;
        height: 100%;
        max-width: 600px;
        max-height: 600px;
	}
	
    h1, h2 {
        font-size: 1.6rem !important;
    }

    h3 {
        font-size: 1.4rem !important;
    }

    .server-status td {
        font-size: 1rem;
    }

    .uptime {
        font-size: 1rem;
    }

    label {
        font-size: 1.1rem;
    }

    input {
        padding: 0.7rem;
        font-size: 1rem;
    }

    .eye-icon {
        font-size: 1.1rem;
    }

    button {
        padding: 0.7rem;
        font-size: 1rem;
    }

    .g-recaptcha {
        transform: scale(0.9);
    }

    .link a {
        font-size: 0.9rem;
    }
}

/* 1080p (1920x1080, ~1920px width) */
@media (min-width: 1281px) and (max-width: 1920px) {
	.container {
		max-width: 550px;
	}
	
	body.panel-login .container::before {
		top: 75;
		left: 625;
        width: 100%;
        height: 100%;
        max-width: 1200px;
        max-height: 1220px;
	}
	
	body.panel-register .container::before {
		top: 75;
		left: 625;
        width: 100%;
        height: 100%;
        max-width: 1200px;
        max-height: 1220px;
	}
	
	body.panel-inside .container::before {
		top: -150;
		left: 330;
        width: 270%;
        height: 270%;
        max-width: 1200px;
        max-height: 1220px;
	}
	
	body.panel-password .container::before {
		top: 30;
		left: 560;
        width: 120%;
        height: 120%;
        max-width: 1200px;
        max-height: 1220px;
	}
	
    h1, h2 {
        font-size: 1.55rem !important;
    }

    h3 {
        font-size: 1.6rem !important;
    }

    .server-status td {
        font-size: 1.1rem;
    }

    .server-status img {
        max-width: 50px;
    }

    .uptime {
        font-size: 1.1rem;
    }

    label {
        font-size: 1.2rem;
    }

    input {
        padding: 0.9rem;
        font-size: 1.1rem;
    }

    .eye-icon {
        font-size: 1.3rem;
    }

    button {
        padding: 0.9rem;
        font-size: 1.1rem;
    }

    .g-recaptcha {
        transform: scale(1);
        margin: 0 0 0.7rem 0;
    }

    .message, .success {
        font-size: 0.9rem;
    }

    .link a {
        font-size: 1rem;
    }
}

/* 1440p (2560x1440, ~2560px width) */
@media (min-width: 1921px) and (max-width: 2560px) {
	.container {
		max-width: 650px;
	}
	
	body.panel-login .container::before {
		top: 75;
		left: 800;
        width: 100%;
        height: 100%;
        max-width: 1200px;
        max-height: 1220px;
	}
	
	body.panel-register .container::before {
		top: 75;
		left: 800;
        width: 100%;
        height: 100%;
        max-width: 1200px;
        max-height: 1220px;
	}
	
	body.panel-inside .container::before {
		top: -100;
		left: 600;
        width: 270%;
        height: 270%;
        max-width: 1200px;
        max-height: 1220px;
	}
	
	body.panel-password .container {
		max-width: 750px;
	}
	
	body.panel-password .container::before {
		top: 30;
		left: 750;
        width: 120%;
        height: 120%;
        max-width: 1200px;
        max-height: 1220px;
	}
	
    h1, h2 {
        font-size: 2rem !important;
    }

    h3 {
        font-size: 1.8rem !important;
    }

    .server-status td {
        font-size: 1.2rem;
    }

    .server-status img {
        max-width: 55px;
    }

    .uptime {
        font-size: 1.2rem;
    }

    label {
        font-size: 1.3rem;
    }

    input {
        padding: 1rem;
        font-size: 1.2rem;
    }

    .eye-icon {
        font-size: 1.4rem;
    }

    button {
        padding: 1rem;
        font-size: 1.2rem;
    }

    .message, .success {
        font-size: 1rem;
    }

    .link a {
        font-size: 1.1rem;
    }
}

/* 2160p (3840x2160, ~3840px width) */
@media (min-width: 2561px) {
	.container {
		max-width: 1138px; /* 75% increase from 650px (650 * 1.75) */
        padding: 3.5rem; /* 75% increase from 2rem (2 * 1.75) */
    }

    /* Page-specific container adjustments */
    body.panel-password .container {
        max-width: 1400px; /* 75% increase from 800px (800 * 1.75) */
    }

    /* Page-specific .container::before adjustments */
    body.panel-login .container::before {
        top: 10%;
        left: 95%;
        width: 100%;
        height: 100%;
        max-width: 2100px; /* 75% increase from 1200px (1200 * 1.75) */
        max-height: 2135px; /* 75% increase from 1220px (1220 * 1.75) */
    }

    body.panel-register .container::before {
        top: 10%;
        left: 95%;
        width: 100%;
        height: 100%;
        max-width: 2100px;
        max-height: 2135px;
    }

    body.panel-inside .container::before {
        top: 50%;
        left: 50%;
        width: 175%; /* Adjusted from 270% to balance with larger container */
        height: 175%;
        max-width: 2100px;
        max-height: 2135px;
    }

    body.panel-password .container::before {
        top: 50%;
        left: 50%;
        width: 120%;
        height: 120%;
        max-width: 2100px;
        max-height: 2135px;
    }

    /* Adjust content inside .container */
    h1, h2 {
        font-size: 3.85rem !important; /* 75% increase from 2.2rem (2.2 * 1.75) */
    }

    h3 {
        font-size: 3.5rem !important; /* 75% increase from 2rem (2 * 1.75) */
    }

    .server-status td {
        font-size: 2.275rem; /* 75% increase from 1.3rem (1.3 * 1.75) */
    }

    .server-status img {
		width: 100px;
        max-width: 100px; /* 75% increase from 60px (60 * 1.75) */
		vertical-align: middle;
    }

    .uptime {
        font-size: 2.275rem; /* 75% increase from 1.3rem */
    }
	
	.server-message p {
		font-size: 1.75rem; /* 75% increase from 1rem */
	}

    label {
        font-size: 2.45rem; /* 75% increase from 1.4rem (1.4 * 1.75) */
    }

    input {
        padding: 2.1rem; /* 75% increase from 1.2rem (1.2 * 1.75) */
        font-size: 2.275rem; /* 75% increase from 1.3rem */
    }

    .eye-icon {
        font-size: 2.625rem; /* 75% increase from 1.5rem (1.5 * 1.75) */
    }

    button {
        padding: 2.1rem; /* 75% increase from 1.2rem */
        font-size: 2.275rem; /* 75% increase from 1.3rem */
    }

    .g-recaptcha {
		transform: scale(1.75); /* 75% increase in size */
        transform-origin: center; /* Scale from the center */
        margin: 1.7rem 0 2.2rem 0; /* 1rem top, 2rem bellow */
    }
	
	.error-message {
		font-size: 1.75rem; /* 75% increase from 1rem */
		padding: 1.75rem 3.5rem; /* 75% increase from 1rem 2rem */
	}
    .message, .success {
        font-size: 1.925rem; /* 75% increase from 1.1rem (1.1 * 1.75) */
    }

    .link a {
        font-size: 2.1rem; /* 75% increase from 1.2rem (1.2 * 1.75) */
    }
}

/* Windows High-DPI Scaling (125%–200%) */
@media (-webkit-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {
    .container {
        transform: scale(1.05); /* Reduced to avoid oversized text */
    }

    input, button, .eye-icon, .link a, h1, h2, h3 {
        transform: scale(1);
    }
}

@media (-webkit-device-pixel-ratio: 1.5), (min-resolution: 144dpi) {
    .container {
        transform: scale(1.1);
    }

    input, button, .eye-icon, .link a, h1, h2, h3 {
        transform: scale(1);
    }
}

@media (-webkit-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .container {
        transform: scale(1.15); /* Reduced for balance */
    }

    input, button, .eye-icon, .link a, h1, h2, h3 {
        transform: scale(1);
    }
}