:root {
    --primary-color: #00ffff;
    --secondary-color: #00cccc;
    --background-color: rgba(15, 15, 15, 0.9);
    --text-color: #ccc;
    --card-bg: rgba(0, 0, 0, 0.7);
    --btn-hover: #00cccc;
}

.container,
.scale-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Intro Section */
.intro-section {
    width: 100%;
    margin: 2rem auto;
    padding: 2rem;
    background: rgba(15,15,15,0.6);
    border-radius: 12px;
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 15px rgba(0,255,255,0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards;
}

.intro-section h1 {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.intro-section p {
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* Web Sections */
.web-section {
    margin: 2rem auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.web-section h5 {
    color: var(--primary-color);
    font-size: 1.6rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.25rem;
    width: 100%;
    text-align: center;
}

/* Learning Level Cards */
.learning-level {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--primary-color);
    padding: 1rem 1rem 1.5rem;
    flex: 1 1 280px;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    min-height: 280px;
}

.learning-level:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,255,255,0.3);
}

.learning-level h2 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    text-align: center;
}

.learning-level p {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-color);
    margin-bottom: 1rem;
    text-align: center;
}

/* Portrait Images */
.portrait-wrapper {
    position: relative;
    width: 100%;
    margin: 0.8rem 0;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    max-height: 140px;
}

.portrait-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.75);
    transition: transform 0.3s ease;
}

.learning-level:hover .portrait-image {
    transform: scale(1.05);
}

.portrait-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.25);
}

/* Go Button */
.section-go-btn {
    align-self: center;
    background: var(--primary-color);
    color: #000;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    border: 1px solid var(--primary-color);
    transition: all 0.3s ease;
    margin-top: auto;
}

.section-go-btn:hover {
    background: var(--btn-hover);
    color: #fff;
    box-shadow: 0 0 15px var(--primary-color);
}

/* Search */
.search-wrapper {
    margin: 1.5rem auto;
    width: 90%;
    max-width: 1000px;
    text-align: center;
    padding: 0 1rem;
}

#search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.2rem;
    border-radius: 14px;
    border: 2px solid var(--primary-color);
    background: rgba(0, 0, 0, 0.6);
    color: var(--primary-color);
    outline: none;
    transition: 0.3s all;
}

#search-input::placeholder {
    color: #00ffffaa;
}

#search-input:focus {
    box-shadow: 0 0 12px var(--primary-color);
    border-color: var(--primary-color);
}

/* Animations */
@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}
/* --- Responsive Fixes (FULL WIDTH MOBILE) --- */
@media(max-width: 992px) {
    .learning-level {
        flex: 1 1 45%;
        max-width: 45%;
    }
}

@media(max-width: 600px) {

    /* Containers */
    .container,
    .scale-wrapper {
        max-width: 100%;
        padding: 0.8rem 0.6rem;
    }

    /* Intro Section */
    .intro-section {
        padding: 1.2rem;
        margin: 1rem 0.5rem;
    }

    /* Cards FULL width */
    .learning-level {
        flex: 1 1 100%;
        max-width: 100%;
        padding: 0.8rem;
        min-height: auto;

        /* NEW → adds spacing between stacked cards */
        margin-bottom: 1rem;
    }

    .portrait-wrapper {
        max-height: 120px;
    }

    .intro-section h1 { font-size: 1.6rem; }
    .intro-section p { font-size: 0.9rem; }
    .web-section h5 { font-size: 1.4rem; }
    .learning-level h2 { font-size: 1rem; }
    .section-go-btn { padding: 0.4rem 0.8rem; font-size: 0.85rem; }

    /* NEW → increase spacing between items inside section */
    .web-section { 
        gap: 0.8rem; 
    }

    /* Search area wider + cleaner */
    .search-wrapper {
        width: 100%;
        padding: 0 0.5rem;
    }
}

@media(max-width: 400px) {
    .learning-level {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

