/* @import url("./quiz-app-style.css"); */

/* other quiz app section css */

body {
    margin: 0;
    padding: 0;
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
}

main {
    flex-grow: 1 !important;
    padding: 1rem 1rem;
    max-width: 800px;
    margin: 5rem auto;
    min-height: fit-content;
    background-color: #FFE066;
    border-radius: 20px;
    overflow: hidden;
    margin-top: 9rem;/* To prevent main content from being hidden underneath the fixed header */
    margin-bottom: 5rem;
    height: auto; /* Allow height to adjust based on content, combined with min and max height */
    min-height: 50vh; /* Ensure a minimum height */
    max-height: 80%; /* Limit maximum height to 80% of viewport height */
}

/* other quiz app section's main title 'Try Other Quizzes' */
.mt-16 {
    font-family: 'Arial', sans-serif;
    margin-top: 2rem; /* top space */
}

a:link,
a:visited,
a:hover,
a:active {
    text-decoration: none;
}

.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)); }
.bg-gradient-to-r {
    --tw-gradient-position: to right in oklab;
    background-image: linear-gradient(var(--tw-gradient-stops));
}
.bg-clip-text {
    background-clip: text;
}
.text-transparent { color: transparent; }

.from-indigo-900 { --tw-gradient-from: #312e81; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(49, 46, 129, 0)); }
.via-purple-900 { --tw-gradient-stops: var(--tw-gradient-from), #581c87, var(--tw-gradient-to, rgba(88, 28, 135, 0)); }
.to-pink-900 { --tw-gradient-to: #831843; }
.from-gray-900 {
    /*--tw-gradient-from: #111827;
    //--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(17, 24, 39, 0));*/
    --tw-gradient-stops: var(--tw-gradient-to, rgba(17, 24, 39, 0));
}
.to-indigo-900 { --tw-gradient-to: #312e81; }

.px-4 { padding-left: 1rem; padding-right: 1rem; }

/* 'other quiz apps' container */
.py-16 { /* p-8 in other-meter-apps */
    padding-top: 2rem;
    padding-bottom: 1rem;
    border-radius: 15px;
    overflow: hidden;
}
.p-6 { padding: 0.7rem; } /* app-card container */

/* margin-bottom of each category */
.mb-12 {
    margin-bottom: 2.5rem;
}

.text-center { text-align: center; }
.text-left { text-left; }
.text-white { color: white; }
.text-gray-200 { color: #e5e7eb; }
.text-gray-300 { color: #d1d5db; }
.text-purple-400 { color: #a78bfa; }
.text-blue-400 { color: #60a5fa; }
.text-pink-400 { color: #f472b6; }
.text-green-400 { color: #4ade80; }
.text-yellow-400 { color: #facc15; }

.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1.3; }
.text-6xl { font-size: 3.75rem; line-height: 1.3; }
.text-2xl {/* title of each category */
    font-size: 1.5rem; /* 1.2rem @media */
    line-height: 2rem;
    margin-bottom: 0.5rem;
}
.text-xl {/* other quiz apps description below logo title */
    font-size: 1.25rem;/* 1.1rem @media */
    line-height: 1.75rem;
}
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

.inline-flex { display: inline-flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-3 { gap: 0.75rem; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.w-full { width: 100%; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-12 { width: 3rem; }
.w-16 { width: 4rem; }
.w-8 { width: 2rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-12 { height: 3rem; }
.h-2 { height: 0.5rem; }

.rounded-full { border-radius: 9999px; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-xl { border-radius: 0.75rem; }

.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }

.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-300 { transition-duration: 300ms; }
.duration-500 { transition-duration: 500ms; }

.cursor-pointer { cursor: pointer; }
.leading-relaxed { line-height: 1.625; }
.tracking-tight { letter-spacing: -0.025em; }

.hidden { display: none; }
.block { display: block; }
.relative { position: relative; }
.absolute { position: absolute; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }

.blur-3xl { filter: blur(64px); }
.blur-xl { filter: blur(24px); }
.opacity-30 { opacity: 0.3; }
.opacity-0 { opacity: 0; }
.opacity-20 { opacity: 0.2; }

.group:hover .group-hover\:translate-x-1 { transform: translateX(0.25rem); }
.group:hover .group-hover\:rotate-180 { transform: rotate(180deg); }
.group:hover .group-hover\:opacity-20 { opacity: 0.2; }
.hover\:scale-105:hover { transform: scale(1.05); }
.hover\:scale-\[1\.02\]:hover { transform: scale(1.02); }
.hover\:shadow-2xl:hover { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
.hover\:shadow-lg:hover { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }

.flex-wrap { flex-wrap: wrap; }

.back-to-top {
    position: fixed;
    top: 90%;
    right: 25px;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: #ffe066;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0; /* important not to be affected by the app button style */
}

.back-to-top.visible {
    opacity: 0.8;
    visibility: visible;
}

/* Simple arrow design */
.arrow {
    width: 24px;
    height: 24px;
    position: relative;
}

/* Arrow head pointing up */
.arrow::after {
    content: '';
    position: absolute;
    top: 30%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-top: 2px solid #333;
    border-right: 2px solid #333;
    transform: translate(-50%, -50%) rotate(-45deg);
    border-radius: 1px;
}

/* Mobile Responsive */
@media (min-width: 480px) {
    
}

@media (min-width: 768px) {
    .md\:text-5xl { font-size: 3rem; line-height: 1.3; }
    .md\:text-6xl { font-size: 3.75rem; line-height: 1.3; }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-out {
    animation: slideOut 0.3s ease-in-out forwards;
}

@keyframes slideOut {
    to { opacity: 0; transform: scale(0.95); }
}

.floating {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.gradient-text {
    background-image: linear-gradient(135deg, #a78bfa 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.quiz-card {
    background: rgba(16, 185, 129, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(16, 185, 129, 0.2);
    transition: all 0.3s ease;
}

.quiz-card:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    transform: translateY(-2px);
}

.border { border-width: 1px; }

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-out {
    animation: slideOut 0.3s ease-in-out forwards;
}

@keyframes slideOut {
    to { opacity: 0; transform: scale(0.95); }
}

.floating {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.gradient-text {
    background-image: linear-gradient(135deg, #a78bfa 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.quiz-card {
    background: rgba(16, 185, 129, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(16, 185, 129, 0.2);
    transition: all 0.3s ease;
}

.quiz-card:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    main {
        margin-top: 4rem;/* To prevent main content from being hidden underneath the fixed header */
        margin-bottom: 4rem;
    }

    .text-6xl {font-size: 3.5rem;}
}

/* Surface Duo and similar dual-screen devices */
@media screen and (min-width: 540px) and (max-width: 768px) and (orientation: portrait) {
    main {
        margin-top: 5rem;/* To prevent main content from being hidden underneath the fixed header */
    }
}
/* Surface Duo and similar dual-screen devices */
@media screen and (max-width: 768px) and (max-height: 540px) and (orientation: landscape) {
    main {
        margin-top: 5rem;/* To prevent main content from being hidden underneath the fixed header */
    }
}

/* Samsung Galaxy S8+ */
@media screen and (min-width: 730px) and (max-width: 750px) and (orientation: landscape) {
    main {
        margin-top: 5rem;/* To prevent main content from being hidden underneath the fixed header */
    }
}

@media screen and (max-width: 480px) {
    main {
        margin-top: 4rem;/* To prevent main content from being hidden underneath the fixed header */
        margin-bottom: 2rem;
    }

    .logo {
        font-size: 1.7rem;
    }

    .text-2xl {/* title of each category */
        font-size: 1.2rem;
    }

    .text-xl {/* other quiz apps description below logo title */
        font-size: 1.1rem;
        line-height: 1.75rem;
    }

    .text-6xl {font-size: 3.0rem;}
}

/* iPhone SE landscape (375px x 667px) */
@media screen and (min-width: 660px) and (min-height: 370px) and (max-height: 380px) and (orientation: landscape) {
    main {
        margin-top: 4rem;/* To prevent main content from being hidden underneath the fixed header */
    }
}

/* iPhone XR, 12 Pro, 14 Pro Max, Samsung Galaxy S20 Ultra Landscape */
@media screen and (min-width: 790px) and (max-width: 935px) and (max-height: 440px) and (orientation: landscape) {
    main {
        margin-top: 4rem;/* To prevent main content from being hidden underneath the fixed header */
    }
}

/* iPad Mini Landscape */
@media screen and (min-width: 1014px) and (max-width: 1034px) and (orientation: landscape) {
    main {
        margin-top: 7rem;/* To prevent main content from being hidden underneath the fixed header */
    }
}

/* iPad Air landscape */
@media screen and (min-width: 1170px) and (min-height: 810px) and (max-height: 830px) and (orientation: landscape) {
    main {
        margin-top: 8rem;/* To prevent main content from being hidden underneath the fixed header */
    }
}

/* iPad Mini (768px x 1024px) & Surface Pro 7 */
@media screen and (min-width: 758px) and (min-height: 1024px) and (orientation: portrait) {
     main {
        margin-top: 9rem; /* To prevent main content from being hidden underneath the fixed header */
        height: auto; /* Allow height to adjust based on content, combined with min and max height */
        min-height: 50vh; /* Ensure a minimum height */
        max-height: 80%; /* Limit maximum height to 80% of viewport height */
    }

    .nav-menu {
        gap: 8px;
    }

    .nav-link {
        font-size: 1.1rem;
    }

    .logo {
        font-size: 2rem;
    }

    .begin-button, .begin-btn, .start-btn {
        margin-top: 2rem;
        margin-bottom: 4rem;
    }
}

/* iPad Pro Portrait (1024px x 1366px) */
@media screen and (min-width: 1014px) and (max-width: 1034px) and (orientation: portrait) {
    main {
        margin-top: 9rem; /* To prevent main content from being hidden underneath the fixed header */
        height: auto; /* Allow height to adjust based on content, combined with min and max height */
        min-height: 50vh; /* Ensure a minimum height */
        max-height: 80%; /* Limit maximum height to 80% of viewport height */
    }

    .begin-button, .begin-btn, .start-btn {
        margin-top: 2rem;
        margin-bottom: 4rem;
    }

    .text-sm { font-size: 1.1rem; }
}

@media screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) {
    main {
        margin-top: 5rem;
    }

    .text-6xl { font-size: 3.55rem; }
}