/* ================== GLOBAL STYLES ================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Times New Roman', Times, serif;
    background-color: #ffffff;
    color: #333;
    overflow-x: hidden;
}

h1, h2 {
    text-align: center;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ================== HEADER ================== */
.header {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 10px 20px;
    background: linear-gradient(90deg, #acdcee, #6274fc, #5911f4);
    color: #18086d;
    gap: 10px;
}

.header-image {
    flex: 0 0 auto;
    width: 20vw;
    max-width: 120px;
    text-align: center;
}

.header-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.header-title {
    flex: 1 1 300px;
    text-align: center;
}

.header-title h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.nav-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.nav-btn {
    background-color: #bde6fa;
    color: #270752;
    border: none;
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
    text-align: center;
}

.nav-btn:hover,
.nav-btn:active {
    background-color: #a673e9;
    color: #fff;
    transform: scale(1.05);
}

/* ================== MODALS ================== */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: rgba(0,0,0,0.6);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.modal-content h2 {
    margin-bottom: 10px;
}

.close {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

/* ================== STUDY MATERIAL SECTION ================== */
.study-section {
    padding: 30px 10px;
    background-color: #f9f9f9;
}

.study-section h2 {
    margin-bottom: 20px;
}

.study-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    max-width: 1000px;
    margin: 0 auto;
}

.study-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #c4a3f0, #f57cb9, #828cfb);
    color: #490c63;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    min-height: 60px;
}

.study-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ================== GAMES SECTION ================== */
.games-section {
    padding: 30px 10px;
    background-color: #ffffff;
    text-align: center;
}

.games-section h2 {
    margin-bottom: 15px;
}

.games-strip {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 95%;
    max-width: 600px;
    margin: 0 auto;
    overflow-y: auto;
    overflow-x: hidden;
    cursor: grab;
    height: auto;
    padding: 10px;
}

.game-btn {
    flex: 0 0 auto;
    width: 100%;
    padding: 12px 18px;
    background: linear-gradient(135deg, #c1c0d5, #6799f0, #bb33ed);
    color: #44123f;
    border-radius: 25px;
    font-weight: 500;
    text-align: center;
    white-space: normal;
    transition: all 0.3s ease;
}

.game-btn:hover,
.game-btn:active {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ================== CAROUSEL ================== */
.carousel-container {
    position: relative;
    display: flex;
    width: 95%;
    max-width: 1200px;
    height: 40vh;
    margin: 50px auto;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.carousel-bg {
    position: absolute;
    top: 0;
    width: 25%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(5px);
    z-index: 5;
    transition: background-image 0.5s ease-in-out;
}

.left-bg { left: 0; }
.right-bg { right: 0; }

.carousel-display {
    position: relative;
    flex-grow: 1;
    height: 100%;
    overflow: hidden;
}

.carousel-link {
    display: none;
    width: 100%;
    height: 100%;
}

.carousel-link.active { display: block; }

.carousel-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 12px;
    cursor: pointer;
    z-index: 15;
    font-size: 24px;
    border-radius: 50%;
}

.carousel-btn:hover {
    background-color: rgba(0,0,0,0.8);
}

.prev-btn { left: 10px; }
.next-btn { right: 10px; }

/* ================== FEEDBACK BUTTON ================== */
.pulse-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-image: linear-gradient(to right, #c7bded, #5e46e7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    cursor: pointer;
    z-index: 1001;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(180, 61, 244, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 15px rgba(40, 167, 69, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

#feedback-form {
    position: fixed;
    bottom: 90px;
    right: 5%;
    width: 80vw;
    height: 60vh;
    z-index: 10000;
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    display: none;
}

#feedback-form iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ================== FOOTER ================== */
.footer {
    background: linear-gradient(90deg, #6a00f4, #ff007f, #ff7f00);
    color: #fff;
    padding: 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1000px;
    margin: 0 auto;
}

.footer-info p {
    margin: 5px 0;
}

.footer-play img {
    width: 150px;
    margin-top: 10px;
}

/* ================== MEDIA QUERIES ================== */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
    }

    .header-image { width: 25vw; max-width: 100px; }
    .header-title h1 { font-size: 1.7rem; }

    .study-grid { grid-template-columns: repeat(2, 1fr); }
    .carousel-container { height: 35vh; }
    .games-strip { max-width: 90%; }
}

@media (max-width: 480px) {
    .header-title h1 { font-size: 1.5rem; }
    .study-grid { grid-template-columns: 1fr; }
    .nav-btn { font-size: 0.9rem; padding: 8px 12px; }
    .carousel-container { height: 30vh; }
    .games-strip { max-width: 95%; }
}
