/* portal.css - Premium AI Detective Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&family=Outfit:wght@700&display=swap');

:root {
    --bg-color: #0d0d12;
    --text-color: #e0e0e0;
    --accent-color: #00f2ff;
    /* Cyan Neon */
    --accent-secondary: #7000ff;
    /* Purple Neon */
    --accent-trust: #4facfe;
    /* Blue for Parents/School */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-hover: rgba(255, 255, 255, 0.1);
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Animation */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, #1a1a2e 0%, #0d0d12 100%);
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
    /* Noise texture */
    opacity: 0.03;
    z-index: -1;
    pointer-events: none;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: white;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -1px;
    line-height: 1.1;
}

h2 {
    font-size: 2.5rem;
}

p {
    font-size: 1.1rem;
    color: #aaa;
    margin-bottom: 1.5rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-trust {
    background: linear-gradient(135deg, #4facfe, #00f2ff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header,
footer {
    padding: 20px 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Header */
.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--accent-color);
}

.btn-login {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    border: 1px solid var(--glass-border);
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    font-weight: 600;
}

.btn-login:hover {
    background: var(--accent-color);
    color: black;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.4);
}

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 4rem 0;
}

.hero-content {
    z-index: 10;
    max-width: 800px;
}

.hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    opacity: 0.4;
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}

.scroll-down {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 20;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translate(-50%, 0);
    }

    40% {
        transform: translate(-50%, -10px);
    }

    60% {
        transform: translate(-50%, -5px);
    }
}

/* Intro Section */
.intro {
    padding: 4rem 0;
    text-align: center;
}

@media (max-width: 600px) {
    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.4rem;
    }

    p {
        font-size: 1rem;
    }
}

/* Target Selection Grid */
.target-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    padding-bottom: 4rem;
}

/* Steps Grid (Specific for 4-step guides) */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
    padding-bottom: 3rem;
}

@media (max-width: 900px) {
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .steps-grid {
        gap: 0.5rem;
    }

    .steps-grid .target-card {
        padding: 1rem;
    }

    .steps-grid .card-icon {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .steps-grid h3 {
        font-size: 0.9rem;
    }

    .steps-grid p {
        font-size: 0.75rem;
        line-height: 1.3;
    }
}

.target-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.target-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: 0.3s;
}

.target-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.target-card:hover::before {
    opacity: 1;
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.card-desc {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.card-btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 600;
    transition: 0.3s;
}

.target-card:hover .card-btn {
    background: var(--accent-color);
    color: black;
}

/* Specialized Colors for Roles */
.role-user:hover {
    border-color: var(--accent-color);
}

.role-user:hover .card-btn {
    background: var(--accent-color);
    color: black;
}

.role-parent:hover {
    border-color: #ff9f43;
}

.role-parent .card-btn {
    color: #ff9f43;
}

.role-parent:hover .card-btn {
    background: #ff9f43;
    color: black;
}

.role-teacher:hover {
    border-color: #2ed573;
}

.role-teacher .card-btn {
    color: #2ed573;
}

.role-teacher:hover .card-btn {
    background: #2ed573;
    color: black;
}

.role-school:hover {
    border-color: #5f27cd;
}

.role-school .card-btn {
    color: #5f27cd;
}

.role-school:hover .card-btn {
    background: #5f27cd;
    color: white;
}

/* PR Page Specifics */
.pr-hero {
    padding: 6rem 0;
    text-align: center;
    background: radial-gradient(circle at 50% 30%, rgba(0, 242, 255, 0.15), transparent 60%);
}

.pr-section {
    padding: 4rem 0;
}

.pr-section:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 900px) {
    .grid-2 {
        gap: 1.5rem;
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 600px) {

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Table Responsive Utility */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.cta-box {
    background: linear-gradient(135deg, rgba(0, 242, 255, 0.1), rgba(112, 0, 255, 0.1));
    border: 1px solid var(--accent-color);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    margin-top: 2rem;
}

.btn-cta {
    background: linear-gradient(90deg, var(--accent-color), var(--accent-secondary));
    color: white;
    padding: 15px 40px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    display: inline-block;
    margin-top: 1rem;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.4);
    transition: 0.3s;
    border: none;
    cursor: pointer;
}

.btn-cta:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(0, 242, 255, 0.6);
}

/* Footer */
footer {
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
}

footer a {
    color: #888;
    text-decoration: none;
    margin: 0 10px;
}

footer a:hover {
    color: white;
}

/* Ported/Adapted Modal Styles for Portal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: rgba(20, 20, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-scroll-area {
    overflow-y: auto;
    max-height: 60vh;
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: left;
    color: #ccc;
    line-height: 1.6;
}

.modal-scroll-area h3 {
    color: var(--color-base-blue);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    border-left: 4px solid var(--color-base-blue);
    padding-left: 10px;
}

.modal-scroll-area h3:first-child {
    margin-top: 0;
}

/* Scrollbar for modal */
.modal-scroll-area::-webkit-scrollbar {
    width: 8px;
}

.modal-scroll-area::-webkit-scrollbar-track {
    background: #111;
}

.modal-scroll-area::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.modal-scroll-area::-webkit-scrollbar-thumb:hover {
    background: var(--color-base-blue);
}

/* Form Element Styles */
input,
textarea {
    transition: all 0.3s ease;
    outline: none;
}

input:focus,
textarea:focus {
    border-color: var(--accent-color) !important;
    background: rgba(0, 0, 0, 0.5) !important;
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
}

.modal-content table th {
    font-family: var(--font-heading);
    color: var(--accent-color);
}

/* Logo Update */
.logo-circle {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--accent-color);
    background-color: #fff;
    /* White background for visibility */
}

/* Background Slideshow */
.hero-bg-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.hero-bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

.hero-bg-layer.bg-1 {
    background-image: url('../img/hero_bg_1.png');
}

.hero-bg-layer.bg-2 {
    background-image: url('../img/hero_bg_2.png');
}

.hero-bg-layer.bg-3 {
    background-image: url('../img/hero_bg_3.png');
}

.hero-bg-layer.fade-in {
    opacity: 0.4;
    /* Keeping it slightly transparent for hero text readability */
}

/* Character Scroller */
.char-scroller-section {
    position: relative;
    height: 250px;
    margin: 2rem 0;
    overflow: hidden;
    background: url('../img/scroll_bg.png') center/cover;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.char-scroller-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* Overlay to make characters stand out */
    z-index: 1;
}

.char-marquee {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
}

.char-marquee-content {
    display: flex;
    white-space: nowrap;
    animation: marquee 60s linear infinite;
}

.marquee-char {
    height: 150px;
    margin: 0 30px;
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s;
}

.marquee-char:hover {
    transform: scale(1.1);
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Specific character handling */
.char-dragon {
    mix-blend-mode: screen;
    filter: contrast(1.5) brightness(1.1) drop-shadow(0 0 2px black);
}

/* PR Page Buttons */
.btn-container-center {
    display: flex;
    justify-content: center;
    margin: 4rem 0;
}

.auth-brand-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
}

.logo-glow {
    filter: drop-shadow(0 0 10px rgba(0, 242, 255, 0.4));
    transition: filter 0.3s ease;
    max-width: 180px;
    width: 100%;
    height: auto;
    display: block;
}

.logo-glow:hover {
    filter: drop-shadow(0 0 15px rgba(0, 242, 255, 0.6));
}

.auth-logo-text {
    position: absolute;
    top: 75%;
    /* Position to overlap lower part of logo */
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    white-space: nowrap;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(to bottom, #fff 0%, #aaa 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(0, 242, 255, 0.8), 0 0 40px rgba(0, 242, 255, 0.3);
    letter-spacing: 0.2rem;
    pointer-events: none;
    z-index: 10;
}

.btn-back-portal {
    display: inline-block;
    padding: 1rem 3rem;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-weight: bold;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-back-portal:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(var(--accent-rgb), 0.4);
}


/* PR Page Game Screens */
.game-screen-shot {
    margin-top: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.game-screen-shot img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.game-screen-shot:hover {
    transform: scale(1.03);
    border-color: var(--accent-color);
}

/* Mission Statement */
.mission-section {
    padding: 4rem 1rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.mission-content p {
    font-size: 0.95rem;
    line-height: 2;
    color: #aaa;
    max-width: 900px;
    margin: 0 auto;
}

.hero-char-img {
    margin-bottom: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

.hero-char-img img {
    max-width: 400px;
    height: auto;
    filter: drop-shadow(0 0 15px var(--accent-color));
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Image Zoom Styles (Standardized) */
.expandable-image,
.clickable-expand {
    cursor: zoom-in;
    transition: transform 0.2s, filter 0.2s;
}

.expandable-image:hover,
.clickable-expand:hover {
    transform: scale(1.01);
    filter: brightness(1.1);
}

#image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
    opacity: 0;
    transition: opacity 0.3s;
}

#image-modal.active {
    display: flex;
    opacity: 1;
}

#image-modal img {
    width: 90vw;
    height: 90vh;
    object-fit: contain;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    border: 1px solid #444;
    border-radius: 4px;
    transform: scale(0.9);
    transition: transform 0.3s;
}

#image-modal.active img {
    transform: scale(1);
}

.modal-hint {
    position: absolute;
    bottom: 2rem;
    color: #888;
    font-size: 0.9rem;
    pointer-events: none;
}

.hero-infograph-container {
    margin: 2rem auto;
    max-width: 600px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    width: 90%;
}

.hero-infograph-container img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* Badge Grid */
.badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 10px;
    margin-top: 1rem;
}

.badge-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 5px;
    text-align: center;
    font-size: 2rem;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80px;
}

.badge-item span {
    display: block;
    margin-top: 5px;
    line-height: 1.2;
}

.badge-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    border-color: var(--accent-color);
}