@import url('https://fonts.googleapis.com/css2?family=Gotham:wght@300;400;700&display=swap');

/* Custom font face for Boldonse */
@font-face {
    font-family: 'Boldonse';
    src: url('../fonts/Boldonse-Regular.ttf') format('truetype');
    font-weight:lighter;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100vh;
    overflow: scroll;
}

body {
    font-family: 'Gotham', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 300; /* Set light as default weight */
    background: linear-gradient(135deg, #008C7A 0%, #006b5d 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;

    flex-direction: column;
}


/* Loading Screen Styles */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #008C7A;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.loading-screen.active {
    opacity: 1;
    pointer-events: auto;
}

.logo-container {
    width: 200px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-logo {
    width: 200px;
    opacity: 0;
    animation: spin 1.5s infinite;
}

@keyframes spin {
    0% { }
  40% { transform: rotate(10deg); background-position: bottom; opacity: 1.2; }
    100% { transform: rotate(-360deg); }
}

.loading-screen.active .loading-logo {
    opacity: 1;
    transform: rotate(0) scale(1);
}

@media (max-width: 768px) {
    .logo-container {
        width: 150px;
        height: 150px;
    }
    
    .loading-logo {
        width: 150px;
    }
}


.container {
    max-width: 550px;
    width: 100%;
    max-height: 95vh;
    background: white;
    border-radius: 15px 15px 0 0;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow-y: scroll;
}

header {
    background: linear-gradient(135deg, #003940 0%, #005962 100%);
    color: white;
    text-align: center;
    padding: 20px 15px;
    flex-shrink: 0;
}

header h1 {
    font-family: 'Boldonse', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.6rem;
    margin-bottom: 5px;
    font-weight: 700;
}

header p {
    font-size: 0.9rem;
    opacity: 0.9;
}

header p:not(:last-child){
    margin-bottom: 10px;
}

header strong{
    font-weight: 700;
}

.footer-text{
    font-size: 0.9rem;
    width: 100%;
}

.screen {
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.5s ease;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 20px 25px;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    height: calc(95vh - 90px);
}

.screen.active {
    opacity: 1;
    transform: translateX(0);
    position: relative;
    pointer-events: auto;
    flex: 1;
    height: auto;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    margin-bottom: 15px;
    overflow: hidden;
    flex-shrink: 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a90e2, #2c5aa0);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 3px;
}

.question-counter {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.question-card {
    text-align: center;
    opacity: 1;
    transition: opacity 0.3s ease;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 0;
}

.question-card.fading {
    opacity: 0;
}

.question-card h2 {
    font-family: 'Gotham', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: #003940;
    margin-bottom: 8px;
    line-height: 1.3;
    flex-shrink: 0;
}

.question-subtitle {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.answer-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.answer-btn {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
    position: relative;
    overflow: hidden;
}

.answer-btn:hover {
    border-color: #4a90e2;
    background: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.2);
}

.answer-btn:active {
    transform: translateY(0);
}

.answer-btn.selected {
    background: #4a90e2;
    border-color: #2c5aa0;
    color: white;
}

.answer-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.3);
}

.results-card {
    text-align: center;
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.results-card h2 {
    font-family: 'Gotham', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    color: #003940;
    margin-bottom: 20px;
}

.score-display {
    margin-bottom: 25px;
}

.score-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #4a90e2;
    display: block;
    line-height: 1;
}

.score-total {
    font-size: 1rem;
    color: #666;
    margin-top: 6px;
}

.persona-result {
    background: #f8f9ff;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 20px;
    border: 2px solid #e6edff;
    max-width: 350px;
    width: 100%;
}

.persona-result h3 {
    font-family: 'Gotham', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 700;
    color: #003940;
    margin-bottom: 10px;
    font-size: 1rem;
}

.persona-badge {
    background: linear-gradient(135deg, #4a90e2, #2c5aa0);
    color: white;
    padding: 10px 18px;
    border-radius: 18px;
    display: inline-block;
    margin-bottom: 12px;
    font-size: 1rem;
    font-weight: 600;
}

.persona-result p {
    color: #555;
    font-size: 0.85rem;
    line-height: 1.5;
}

.restart-btn {
    background: linear-gradient(135deg, #4a90e2, #2c5aa0);
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.restart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.3);
}

.restart-btn:active {
    transform: translateY(0);
}

.restart-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.3);
}

.drop-zones {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    justify-content: center;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.drop-zone {
    background: #f8f9ff;
    border: 2px dashed #e0e0e0;
    border-radius: 10px;
    padding: 12px 8px;
    min-width: 90px;
    min-height: 75px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    flex: 1;
    max-width: 110px;
}

.drop-zone:hover {
    border-color: #4a90e2;
    background: #f0f6ff;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(74, 144, 226, 0.2);
}

.drop-zone[style*="pointer-events: none"] {
    cursor: not-allowed;
}

.drop-zone[style*="pointer-events: none"]:hover {
    transform: none;
    box-shadow: none;
    border-color: #e0e0e0;
    background: #f8f9ff;
}

.drop-zone.drag-over {
    border-color: #2c5aa0;
    background: #e6f3ff;
    border-style: solid;
    transform: scale(1.05);
}

.drop-zone.correct-answer {
    border-color: #28a745;
    background: #e8f5e8;
    animation: correctPulse 0.5s ease;
}

.drop-zone.incorrect-answer {
    border-color: #dc3545;
    background: #ffeaea;
    animation: incorrectShake 0.5s ease;
}

@keyframes correctPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes incorrectShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.zone-icon {
    font-size: 1.6rem;
    margin-bottom: 4px;
}

.zone-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #2c5aa0;
    margin-bottom: 2px;
}

.zone-description {
    font-size: 0.65rem;
    color: #666;
    text-align: center;
    line-height: 1.2;
}

.drag-area {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9ff;
    border-radius: 10px;
    border: 2px solid #e6edff;
    flex-shrink: 0;
}

.drag-instructions {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 12px;
    font-weight: 500;
}

.draggable-card {
    background: white;
    border: 2px solid #4a90e2;
    border-radius: 10px;
    padding: 12px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    cursor: grab;
    transition: all 0.3s ease;
    user-select: none;
    position: relative;
}

.draggable-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.3);
}

.draggable-card[style*="pointer-events: none"] {
    cursor: not-allowed;
}

.draggable-card[style*="pointer-events: none"]:hover {
    transform: none;
    box-shadow: none;
}

.draggable-card:active,
.draggable-card.dragging {
    cursor: grabbing;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 30px rgba(74, 144, 226, 0.4);
    z-index: 1000;
}

.draggable-card:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.3);
}

.service-emoji {
    font-size: 2rem;
    margin-bottom: 6px;
    transition: transform 0.3s ease;
}

.draggable-card:hover .service-emoji {
    transform: scale(1.1);
}

.service-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #2c5aa0;
    text-align: center;
    line-height: 1.2;
}

.feedback-message {
    margin-top: 12px;
    padding: 6px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    font-size: 0.65rem;
}

.feedback-message.show {
    opacity: 1;
    transform: translateY(0);
}

.feedback-message.correct {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.feedback-message.incorrect {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.share-feedback {
    text-align: center;
    font-size: 0.8rem;
    color: #28a745;
    font-weight: 600;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.share-feedback.show {
    opacity: 1;
    transform: translateY(0);
}

.context-message {
    margin-top: 8px;
    padding: 3px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-style: italic;
    color: #555;
    line-height: 1.2;
}

.learn-more-link {
    display: inline;
    color: #2c5aa0;
    font-weight: 600;
    text-decoration: underline;
    margin-left: 0;
    cursor: pointer;
    transition: color 0.2s ease;
    font-style: normal; /* Reset italic from parent */
}

.learn-more-link:hover {
    color: #4a90e2;
    text-decoration: underline;
}

.learn-more-link:focus {
    outline: 2px solid #4a90e2;
    outline-offset: 2px;
}

.next-btn {
    background: linear-gradient(135deg, #4a90e2, #2c5aa0);
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.3);
}

.next-btn:active {
    transform: translateY(0);
}

.next-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.3);
}

/* Footer Styles */
.quiz-footer {
    padding: 10px;
    background-color: #f8f9ff;
    border-top: 1px solid #e6edff;
    text-align: center;
    flex-shrink: 0;
    border-radius: 0 0 15px 15px;
    max-width: 550px;
    width: 100%;
}

.footer-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
}

.footer-logo {
    width: 80px;
    height: auto;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-logo:hover {
    opacity: 1;
}

.creator-credit {
    font-size: 0.75rem;
    color: #666;
    font-weight: 400;
}

/* Adjust for mobile */
@media (max-width: 768px) {
    .footer-logo {
        width: 70px;
    }
    
    .creator-credit {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .quiz-footer {
        padding: 8px;
    }
    
    .footer-logo {
        width: 60px;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        padding: 8px;
    }
    
    .container {
        max-width: 100%;
        max-height: 98vh;
        border-radius: 12px 12px 0 0;
    }
    
    header {
        padding: 15px 12px;
    }
    
    header h1 {
        font-size: 1.4rem;
    }
    
    header p, .footer-text {
        font-size: 0.8rem;
    }
    
    .screen {
        padding: 15px 20px;
        height: calc(98vh - 75px);
    }
    
    .question-card h2 {
        font-size: 1.2rem;
    }
    
    .question-subtitle {
        font-size: 0.8rem;
    }
    
    .drop-zones {
        gap: 8px;
        margin: 15px 0;
    }
    
    .drop-zone {
        min-width: 75px;
        min-height: 65px;
        padding: 10px 6px;
    }
    
    .zone-icon {
        font-size: 1.4rem;
    }
    
    .zone-label {
        font-size: 0.75rem;
    }
    
    .zone-description {
        font-size: 0.6rem;
    }
    
    .draggable-card {
        padding: 10px;
    }
    
    .service-emoji {
        font-size: 1.7rem;
    }
    
    .service-name {
        font-size: 0.75rem;
    }
    
    .drag-area {
        margin-top: 15px;
        padding: 12px;
    }
    
    .drag-instructions {
        font-size: 0.8rem;
        margin-bottom: 10px;
    }
    
    .results-card h2 {
        font-size: 1.4rem;
    }
    
    .score-number {
        font-size: 2rem;
    }
    
    .persona-result {
        padding: 15px;
    }
    
    .context-message {
        font-size: 0.65rem;
        padding: 3px;
    }
    
    .next-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
        margin-top: 12px;
    }
}

@media (max-width: 480px) {
    .drop-zones {
        gap: 6px;
    }
    
    .drop-zone {
        min-width: 65px;
        min-height: 55px;
        padding: 8px 4px;
    }
    
    .zone-icon {
        font-size: 1.2rem;
    }
    
    .zone-label {
        font-size: 0.7rem;
    }
    
    .zone-description {
        font-size: 0.55rem;
    }
    
    .service-emoji {
        font-size: 1.5rem;
    }
    
    .draggable-card {
        padding: 8px;
    }
    
    .service-name {
        font-size: 0.7rem;
    }
    
    .next-btn {
        padding: 6px 14px;
        font-size: 0.75rem;
        margin-top: 10px;
    }
}

/* Landscape mobile optimization */
@media (max-height: 600px) and (orientation: landscape) {
    .container {
        max-height: 95vh;
    }
    
    header {
        padding: 10px 12px;
    }
    
    header h1 {
        font-size: 1.2rem;
        margin-bottom: 2px;
    }
    
    header p, .footer-text {
        font-size: 0.7rem;
    }
    
    .screen {
        padding: 10px 15px;
        height: calc(95vh - 55px);
    }
    
    .question-counter {
        margin-bottom: 10px;
        font-size: 0.8rem;
    }
    
    .question-card h2 {
        font-size: 1.1rem;
        margin-bottom: 5px;
    }
    
    .question-subtitle {
        font-size: 0.75rem;
        margin-bottom: 12px;
    }
    
    .drop-zones {
        margin: 10px 0;
        gap: 8px;
    }
    
    .drop-zone {
        min-height: 55px;
        padding: 8px 6px;
    }
    
    .drag-area {
        margin-top: 10px;
        padding: 10px;
    }
    
    .service-emoji {
        font-size: 1.4rem;
    }
    
    .feedback-message {
        margin-top: 6px;
        padding: 3px;
        font-size: 0.65rem;
    }
}

/* Remove hover effects on touch devices */
@media (hover: none) and (pointer: coarse) {
    .drop-zone:hover {
        transform: none;
        box-shadow: none;
    }
    
    .draggable-card:hover {
        transform: none;
        box-shadow: none;
    }
}
