/* --- INTEGRATED CSS FOR TRUTHWEB PORTAL & MODAL --- */
/* This section combines and extends your existing styles with the modal's futuristic design. */

:root {
    --primary-color: #00e6e6; /* Cyan-like, futuristic glow */
    --secondary-color: #2e008b; /* Deep purple */
    --background-dark: #0a0a1a; /* Very dark blue/black */
    --text-light: #e0e0f0;
    --input-bg: rgba(255, 255, 255, 0.08); /* Semi-transparent for glassmorphism */
    --border-glow: rgba(0, 230, 230, 0.4);
    --button-gradient-start: #00ccff;
    --button-gradient-end: #6600ff;
    --button-hover-start: #33e6ff;
    --button-hover-end: #8833ff;

    /* Social button colors */
    --google-blue: #4285F4;
    --discord-purple: #7289DA;
}

@keyframes backgroundPulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.05); opacity: 1; }
}

/* --- Modal Styles --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Dark semi-transparent overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 6;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    background: rgba(15, 15, 30, 0.9);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 0 40px rgba(0, 230, 230, 0.2), 0 0 80px rgba(102, 0, 255, 0.1);
    text-align: center;
    width: 90%;
    max-width: 400px;
    box-sizing: border-box;
    overflow: hidden;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 230, 230, 0.1);
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    max-height: 100vh;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
    opacity: 1;
}

/* Subtle animated border element for modal content (same as login-container::before) */
.modal-content::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    z-index: -1;
    border-radius: 25px;
    background: linear-gradient(120deg, var(--accent, --primary-color), var(--border-glow, --background-dark), var(--accent, --primary-color), var(--border-glow, --secondary-color), var(--accent, --primary-color));
    background-size: 200%;
    animation: borderAnimation 30s linear infinite;
    filter: blur(10px);
}

@keyframes borderAnimation {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.modal-close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.8em;
    color: var(--primary-color);
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    text-shadow: 0 0 8px var(--primary-color);
    z-index: 3; /* Ensure it's above other elements in the modal */
}

.modal-close-button:hover {
    color: var(--button-hover-start);
    transform: rotate(90deg);
}

/* --- Login Form Specific Styles (reused from previous design) --- */
.return-logo {
    display: flex;
    flex-direction: column; /* Stack logo main and slogan vertically */
    align-items: center; /* Center content horizontally */
    margin-bottom: 20px; /* Space below the entire logo section */
}

.return-logo-main { /* Div for icon and h1 */
    display: flex;
    align-items: center; /* Vertically align icon and h1 */
    justify-content: center; /* Center icon and h1 horizontally */
    margin-bottom: 5px; /* Space between the main logo and the slogan */
}

.return-truthweb-logo {
    height: 40px; /* Adjust size as needed */
    width: auto;
    margin-right: 10px; /* Space between logo and text */
    filter: drop-shadow(0 0 8px var(--primary-color)); /* Add a subtle glow to the image */
}

.return-logo-main h1 { /* This targets the h1 inside .logo */
    font-family: 'Orbitron', sans-serif; /* Techy, futuristic font for logo */
    font-size: 2.5em;
    color: var(--primary-color);
    text-shadow: 0 0 15px var(--primary-color), 0 0 30px rgba(0, 230, 230, 0.5); /* Glowing effect */
    margin: 0; /* Remove default h1 margins */
    letter-spacing: 2px;
}

.return-logo p { /* This targets the p inside .return-logo */
    font-size: 0.9em;
    color: var(--text-light);
    opacity: 0.7;
    margin-top: 0; /* Remove top margin as spacing is handled by .logo-main margin-bottom */
    width: 100%; /* Ensure it takes full width below the logo/h1 */
    text-align: center; /* Center the slogan */
}

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

.input-group label {
    display: block;
    font-size: 0.9em;
    margin-bottom: 8px;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.input-group input {
    width: 93%;
    padding: 12px 10px;
    background: var(--input-bg);
    border: 1px solid var(--border-glow);
    border-radius: 10px;
    color: var(--text-light);
    font-size: 1.1em;
    transition: all 0.3s ease-in-out;
    box-shadow: inset 0 0 5px rgba(0, 230, 230, 0.1);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color), inset 0 0 10px var(--primary-color);
    background: rgba(255, 255, 255, 0.15); /* Slightly brighter on focus */
}

/* Placeholder styling for futuristic feel */
.input-group input::placeholder {
    color: rgba(224, 224, 240, 0.5);
    font-style: italic;
}

.login-button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, var(--button-gradient-start), var(--button-gradient-end));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.4s ease;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 0 15px rgba(0, 204, 255, 0.4), 0 0 30px rgba(102, 0, 255, 0.3);
}

.login-button:hover {
    background: linear-gradient(45deg, var(--button-hover-start), var(--button-hover-end));
    box-shadow: 0 0 25px rgba(0, 204, 255, 0.6), 0 0 50px rgba(102, 0, 255, 0.5);
    transform: translateY(-3px);
}

.options {
    margin: 15px 0px 15px 0px;
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
}

.options a {
    color: var(--primary-color);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.options a:hover {
    opacity: 1;
    text-decoration: underline;
    text-shadow: 0 0 5px var(--primary-color);
}

.social-login {
    border-top: 1px solid rgba(0, 230, 230, 0.1);
    padding-top: 20px;
    display: flex; /* Use flexbox to align buttons */
    justify-content: center; /* Center the buttons horizontally */
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    gap: 15px; /* Space between buttons */
}

.social-login p {
    font-size: 0.9em;
    opacity: 0.7;
    color: var(--text-light);
    width: 100%; /* Make paragraph take full width */
}

.social-button {
    background: rgba(0, 230, 230, 0.1);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 230, 230, 0.3);
    display: inline-flex; /* Align icon and text */
    align-items: center;
    justify-content: center;
    min-width: 120px; /* Give buttons a consistent width */
}

.social-button i {
    margin-right: 8px;
}

.social-button:hover {
    background: rgba(0, 230, 230, 0.25);
    box-shadow: 0 0 20px rgba(0, 230, 230, 0.5);
    transform: scale(1.05);
}

/* Specific styles for Truth Key, Google and Discord buttons */
.truthkey-button span {
    color: unset !important;
}

.google-button {
    background: rgba(var(--google-blue), 0.1);
    border-color: var(--google-blue);
    color: var(--google-blue);
    box-shadow: 0 0 10px rgba(var(--google-blue), 0.3);
}

.google-button:hover {
    background: rgba(var(--google-blue), 0.25);
    box-shadow: 0 0 20px rgba(var(--google-blue), 0.5);
}

.discord-button {
    background: rgba(var(--discord-purple), 0.1);
    border-color: var(--discord-purple);
    color: var(--discord-purple);
    box-shadow: 0 0 10px rgba(var(--discord-purple), 0.3);
}

.discord-button:hover {
    background: rgba(var(--discord-purple), 0.25);
    box-shadow: 0 0 20px rgba(var(--discord-purple), 0.5);
}

.footer-links {
    margin-top: 30px;
    font-size: 0.8em;
    opacity: 0.6;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    margin: 0 10px;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}


/* Responsive adjustments for smaller screens */
@media (max-width: 499px) {
    .login-container {
        padding: 20px;
    }
    .logo h1 {
        font-size: 2em;
    }
    .login-button {
        padding: 12px;
        font-size: 1.1em;
    }
    .social-button {
        padding: 8px 12px;
        font-size: 0.9em;
        min-width: unset;
        width: 100%;
        margin-bottom: 10px;
    }
    .social-login {
        flex-direction: column;
        gap: 10px;
    }
}