/* coffee-dog-personality-quiz css */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

main {
    flex-grow: 1 !important;
    padding: 0 1rem;
    max-width: 800px;
    margin: 5rem auto;
    min-height: fit-content;
    background-color: #FFE066;
    border-radius: 20px;
    overflow: hidden;
    margin-top: 7rem;/* 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 */
}

.app-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.welcome-screen {
    margin-bottom: 1rem;
}

.app-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.app-subtitle {
    font-size: 1.2rem;
    line-height: 1.6;
}

.category-btn {
    padding: 1rem;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    border: none;
    border-radius: 15px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(238, 90, 36, 0.3);
    margin: 0 auto;
    width: 220px;
}

.category-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(238, 90, 36, 0.4);
}

.begin-btn {
    padding: 1rem;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.begin-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
}

.progress-container {
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #ffd89b, #19547b);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9rem;
    opacity: 0.8;
}

.answer-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    font-size: 1.1rem;
    color: white;
}

.answer-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateX(5px);
}

.answer-btn.selected {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-color: #667eea;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.nav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.result-screen {
    display: none;
    padding: 1rem 3rem;
}

.result-container {
    text-align: center;
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.result-heading {
    font-size: 3rem;
    color: white;

}

.result-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-description {
    font-size: 1.1rem;
    color: white;
    line-height: 1.8;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.restart-btn {
    padding: 1rem 2rem;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    border: none;
    border-radius: 15px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.restart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(238, 90, 36, 0.3);
}

/*////////////////////////////*/
/* Mobile Responsiveness - Add to funny-meter.css */
/* Tablet styles (768px and below) */
@media screen and (max-width: 768px) {
    main {
        margin-top: 4rem;/* To prevent main content from being hidden underneath the fixed header */
        padding: 0rem 1rem 0.5rem 1rem;
    }

    .category-buttons {
        /*width: 250px;*/
        /*margin: 2rem auto auto auto;*/
        flex-direction: row;
        justify-content: center;
        align-items: center;
        width: 100%;
    }

    .category-btn {
        width: 200px;
        font-size: 1rem;
    }

    .answer-btn { font-size: 0.94rem; }

    .result-screen { padding: 1rem }

    .result-description { font-size: 0.96rem; }
}

/* 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 */
        padding: 0rem 1rem;
        width: 100%;
    }
}

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

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

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

    .logo {
        font-size: 1.7rem;
    }

    .app-title { padding: 5px; }

    .category-buttons {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1rem;
    }

}

/* 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 */
        padding: 0rem 1rem 0.5rem 1rem;
    }
}

/* 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: 5rem;/* 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 */
        padding: 1rem 1rem 0.5rem 1rem;
    }
}

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

/* iPad Mini portrait (768px x 1024px) & Surface Pro 7 portrait */
@media screen and (min-width: 758px) and (min-height: 1024px) and (orientation: portrait) {
    main {
        margin-top: 6rem;/* To prevent main content from being hidden underneath the fixed header */
        padding: 0rem 1rem 0.5rem 1rem;
    }
}

/* iPad Air, Surface Pro 7, and Surface Duo Landscape */
@media screen and (min-width: 720px) and (min-height: 540px) and (max-height: 915px) and (orientation: landscape) {
    main {
        margin-top: 6rem;/* To prevent main content from being hidden underneath the fixed header */
        padding: 0 1rem;
        margin-bottom: 5rem;
    }
}

/* Surface Pro 7 Portrait (912px x 1368px) */
@media screen and (min-width: 900px) and (max-width: 920px) and (orientation: portrait) {
    main {
        margin-top: 6rem;/* To prevent main content from being hidden underneath the fixed header */
        padding: 0rem 1rem;
        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 */
    }
}

/* Galaxy Z Fold 5 (882px x 344px) */
@media screen and (min-width: 880px) and (max-width: 900px) and (max-height: 354px) and (orientation: landscape) {
    main {
        margin-top: 4rem;/* To prevent main content from being hidden underneath the fixed header */
        padding: 0rem 1rem 0.5rem 1rem;
    }
}

/* iPad Air Portrait (820px x 1180px) */
@media screen and (min-width: 810px) and (max-width: 830px) and (orientation: portrait) {
    main {
        margin-top: 7rem;/* To prevent main content from being hidden underneath the fixed header */
        padding: 0 1rem;
    }

    .content-card {
        padding: 1rem;
        border-radius: 25px;
        margin: 1rem auto;
    }
}

/* iPad Pro Portrait (1024px x 1366px) */
@media screen and (min-width: 1014px) and (max-width: 1034px) and (orientation: portrait) {
    main {
        margin-top: 8rem; /* 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 */
    }
}

/* iPad Pro Landscape (1366px x 1024px) is same as desktop viewpoint */