/* ============================================================
   PREMIUM VISUAL ENHANCEMENTS
   Enhanced styling for Flashcards, Try-Outs, Quiz, Resources, FAQ
   ============================================================ */

/* ==================== FLASHCARDS - PREMIUM REDESIGN ==================== */

.flashcards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 40px;
    perspective: 1000px;
}

.flashcard {
    height: 320px;
    position: relative;
    cursor: pointer;
    transition: transform 0.4s ease;
}

.flashcard:hover {
    transform: translateY(-8px) scale(1.02);
}

.flashcard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.flashcard.flipped .flashcard-inner {
    transform: rotateY(180deg);
}

.flashcard-front,
.flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1), 
                0 2px 8px rgba(0, 0, 0, 0.06);
}

.flashcard-front {
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
    color: white;
}

.flashcard-back {
    background: linear-gradient(135deg, #34C759 0%, #30D158 100%);
    color: white;
    transform: rotateY(180deg);
}

.flashcard[data-module="2"] .flashcard-front {
    background: linear-gradient(135deg, #AF52DE 0%, #FF2D55 100%);
}

.flashcard[data-module="2"] .flashcard-back {
    background: linear-gradient(135deg, #FF9500 0%, #FF3B30 100%);
}

.flashcard[data-module="3"] .flashcard-front {
    background: linear-gradient(135deg, #5AC8FA 0%, #007AFF 100%);
}

.flashcard[data-module="3"] .flashcard-back {
    background: linear-gradient(135deg, #32ADE6 0%, #34AADC 100%);
}

.flashcard[data-module="4"] .flashcard-front {
    background: linear-gradient(135deg, #FF9500 0%, #FF6482 100%);
}

.flashcard[data-module="4"] .flashcard-back {
    background: linear-gradient(135deg, #BF5AF2 0%, #FF2D55 100%);
}

.card-number {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.flashcard-front p,
.flashcard-back p {
    font-size: 1.125rem;
    line-height: 1.6;
    margin: 0;
    padding-top: 20px;
}

.flashcard-back p {
    font-size: 1rem;
}

.flip-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    opacity: 0.85;
    font-weight: 500;
    margin-top: auto;
    padding-top: 20px;
}

.flip-hint::before {
    content: "↻";
    font-size: 1.5rem;
    animation: rotate 2s infinite linear;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.flashcard-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 32px 0;
    justify-content: center;
}

.filter-btn {
    padding: 12px 24px;
    border: 2px solid var(--apple-gray-200);
    background: white;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--apple-gray-600);
}

.filter-btn:hover {
    border-color: var(--apple-blue);
    color: var(--apple-blue);
    background: rgba(0, 122, 255, 0.05);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--apple-blue);
    border-color: var(--apple-blue);
    color: white;
    box-shadow: 0 8px 20px rgba(0, 122, 255, 0.3);
}

.flashcard-progress {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.1), rgba(175, 82, 222, 0.1));
    border-radius: 16px;
    padding: 24px;
    margin: 24px 0;
    border-left: 4px solid var(--apple-blue);
}

.flashcard-progress p {
    margin: 0 0 12px 0;
    font-size: 1.125rem;
    color: var(--apple-text);
}

.mini-progress-bar {
    height: 12px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    overflow: hidden;
}

.mini-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--apple-blue), var(--apple-purple));
    border-radius: 6px;
    transition: width 0.5s ease;
    width: 0%;
}

/* ==================== TRY-OUT EXERCISES - PREMIUM REDESIGN ==================== */

.tryout-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 32px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--apple-gray-100);
    transition: all 0.3s ease;
}

.tryout-card:hover {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.tryout-header {
    background: linear-gradient(135deg, var(--apple-blue) 0%, var(--apple-purple) 100%);
    padding: 32px;
    color: white;
    position: relative;
    overflow: hidden;
}

.tryout-header::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.tryout-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.tryout-header h3 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: #000000;
}

.tryout-content {
    padding: 40px;
}

.tryout-instruction {
    font-size: 1.125rem;
    margin-bottom: 28px;
    color: var(--apple-gray-700);
    padding: 20px;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.05), rgba(175, 82, 222, 0.05));
    border-radius: 12px;
    border-left: 4px solid var(--apple-blue);
}

.prompt-tips {
    background: var(--apple-gray-50);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 28px;
    border: 1px solid var(--apple-gray-100);
}

.prompt-tips h5 {
    margin: 0 0 16px 0;
    font-size: 1rem;
    color: var(--apple-text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.prompt-tips h5 i {
    color: var(--apple-yellow);
    font-size: 1.25rem;
}

.prompt-tips ul {
    margin: 0;
    padding-left: 24px;
    color: var(--apple-gray-600);
}

.prompt-tips li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.tryout-input {
    width: 100%;
    padding: 20px;
    border: 2px solid var(--apple-gray-200);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
    background: white;
}

.tryout-input:focus {
    outline: none;
    border-color: var(--apple-blue);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.tryout-submit {
    margin-top: 20px;
    padding: 16px 32px;
    background: var(--apple-blue);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.tryout-submit:hover {
    background: var(--apple-blue-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 122, 255, 0.3);
}

.tryout-feedback {
    margin-top: 24px;
    padding: 20px;
    border-radius: 12px;
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

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

.tryout-feedback.success {
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.1), rgba(48, 209, 88, 0.1));
    border-left: 4px solid var(--apple-green);
    color: var(--apple-text);
}

.tryout-feedback.error {
    background: linear-gradient(135deg, rgba(255, 59, 48, 0.1), rgba(255, 69, 58, 0.1));
    border-left: 4px solid var(--apple-red);
    color: var(--apple-text);
}

/* Mention Simulator */
.mention-simulator {
    margin-top: 28px;
}

.simulator-screen {
    background: white;
    border: 2px solid var(--apple-gray-200);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.simulator-header {
    background: linear-gradient(135deg, #F5F5F7 0%, #E8E8ED 100%);
    padding: 16px 20px;
    font-weight: 600;
    color: var(--apple-gray-700);
    border-bottom: 1px solid var(--apple-gray-200);
    display: flex;
    align-items: center;
    gap: 10px;
}

.simulator-content {
    padding: 24px;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    background: var(--apple-gray-50);
}

.agent-bubble {
    margin-bottom: 16px;
    padding: 16px 20px;
    border-radius: 18px;
    max-width: 80%;
    animation: slideIn 0.3s ease;
    line-height: 1.5;
}

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

.agent-bubble.system {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.1), rgba(175, 82, 222, 0.1));
    color: var(--apple-text);
    margin-left: 0;
    border: 1px solid rgba(0, 122, 255, 0.2);
}

.agent-bubble.user {
    background: var(--apple-blue);
    color: white;
    margin-left: auto;
    margin-right: 0;
}

.agent-bubble.agent {
    background: linear-gradient(135deg, var(--apple-green), var(--apple-teal));
    color: white;
    margin-left: 0;
}

.simulator-input {
    display: flex;
    padding: 16px;
    background: white;
    border-top: 1px solid var(--apple-gray-200);
}

.simulator-input input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--apple-gray-200);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.simulator-input input:focus {
    outline: none;
    border-color: var(--apple-blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.simulator-send {
    margin-left: 12px;
    width: 48px;
    height: 48px;
    background: var(--apple-blue);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.simulator-send:hover {
    background: var(--apple-blue-hover);
    transform: scale(1.05);
}

.available-agents {
    margin-top: 20px;
    padding: 20px;
    background: var(--apple-gray-50);
    border-radius: 12px;
}

.available-agents h5 {
    margin: 0 0 12px 0;
    font-size: 0.9375rem;
    color: var(--apple-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.agent-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.agent-chip {
    padding: 8px 16px;
    background: white;
    border: 2px solid var(--apple-gray-200);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--apple-blue);
    cursor: pointer;
    transition: all 0.3s ease;
}

.agent-chip:hover {
    border-color: var(--apple-blue);
    background: rgba(0, 122, 255, 0.05);
    transform: translateY(-2px);
}

/* Checklist Styling */
.checklist {
    background: white;
    border-radius: 16px;
    overflow: hidden;
}

.checklist-item {
    padding: 24px;
    border-bottom: 1px solid var(--apple-gray-100);
    transition: all 0.3s ease;
}

.checklist-item:last-child {
    border-bottom: none;
}

.checklist-item:hover {
    background: var(--apple-gray-50);
}

.checklist-item input[type="checkbox"] {
    width: 24px;
    height: 24px;
    margin-right: 16px;
    cursor: pointer;
    accent-color: var(--apple-blue);
}

.checklist-item label {
    display: flex;
    align-items: start;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1.6;
}

.checklist-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--apple-gray-200);
    border-radius: 8px;
    font-size: 0.9375rem;
    font-family: inherit;
    margin-top: 12px;
    transition: all 0.3s ease;
}

.checklist-input:focus {
    outline: none;
    border-color: var(--apple-blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* ==================== QUIZ - PREMIUM REDESIGN ==================== */

.quiz-container {
    background: white;
    border-radius: 24px;
    padding: 48px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-top: 32px;
}

.quiz-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--apple-gray-100);
}

.quiz-stats {
    display: flex;
    gap: 24px;
    font-size: 0.9375rem;
    color: var(--apple-gray-600);
}

.quiz-stats strong {
    color: var(--apple-text);
    margin-left: 4px;
}

.quiz-progress-bar {
    flex: 1;
    height: 12px;
    background: var(--apple-gray-100);
    border-radius: 6px;
    overflow: hidden;
    margin-left: 32px;
}

.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--apple-blue), var(--apple-purple));
    border-radius: 6px;
    transition: width 0.5s ease;
}

.quiz-question {
    margin-bottom: 40px;
}

.question-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--apple-blue), var(--apple-purple));
    color: white;
    border-radius: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.question-text {
    font-size: 1.375rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--apple-text);
    margin-bottom: 32px;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.quiz-option {
    padding: 20px 24px;
    background: white;
    border: 2px solid var(--apple-gray-200);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 1rem;
    line-height: 1.5;
}

.quiz-option:hover {
    border-color: var(--apple-blue);
    background: rgba(0, 122, 255, 0.03);
    transform: translateX(4px);
}

.quiz-option input[type="radio"] {
    width: 24px;
    height: 24px;
    accent-color: var(--apple-blue);
    cursor: pointer;
}

.quiz-option.selected {
    border-color: var(--apple-blue);
    background: rgba(0, 122, 255, 0.08);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.15);
}

/* Quiz Results */
.quiz-results {
    text-align: center;
    padding: 48px;
}

.results-card {
    background: white;
    border-radius: 24px;
    padding: 48px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
    max-width: 600px;
    margin: 0 auto;
}

.results-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.results-icon.pass {
    background: linear-gradient(135deg, var(--apple-green), var(--apple-teal));
    color: white;
    box-shadow: 0 12px 32px rgba(52, 199, 89, 0.3);
}

.results-icon.fail {
    background: linear-gradient(135deg, var(--apple-orange), var(--apple-red));
    color: white;
    box-shadow: 0 12px 32px rgba(255, 149, 0, 0.3);
}

.results-score {
    font-size: 3rem;
    font-weight: 800;
    margin: 24px 0;
    background: linear-gradient(135deg, var(--apple-blue), var(--apple-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.results-breakdown {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin: 32px 0;
}

.breakdown-item {
    text-align: center;
}

.breakdown-item .count {
    font-size: 2rem;
    font-weight: 700;
    color: var(--apple-text);
}

.breakdown-item .label {
    font-size: 0.9375rem;
    color: var(--apple-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
}

/* ==================== RESOURCES - PREMIUM REDESIGN ==================== */

.resources-section {
    margin-bottom: 48px;
}

.resources-section h3 {
    font-size: 1.75rem;
    margin-bottom: 24px;
    color: var(--apple-text);
    display: flex;
    align-items: center;
    gap: 12px;
}

.resources-section h3 i {
    color: var(--apple-blue);
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.tool-card {
    background: white;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--apple-gray-100);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--apple-blue), var(--apple-purple));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card h4 {
    font-size: 1.25rem;
    margin: 0 0 12px 0;
    color: var(--apple-text);
}

.tool-card p {
    color: var(--apple-gray-600);
    line-height: 1.6;
    margin-bottom: 20px;
}

.tool-card .btn-secondary {
    width: 100%;
    padding: 12px 24px;
    background: var(--apple-blue);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tool-card .btn-secondary:hover {
    background: var(--apple-blue-hover);
    transform: translateY(-2px);
}

/* ==================== FAQ - PREMIUM REDESIGN ==================== */

.faq-search {
    margin-bottom: 32px;
    position: relative;
}

.faq-search input {
    width: 100%;
    padding: 20px 24px 20px 56px;
    border: 2px solid var(--apple-gray-200);
    border-radius: 16px;
    font-size: 1.125rem;
    transition: all 0.3s ease;
}

.faq-search input:focus {
    outline: none;
    border-color: var(--apple-blue);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.faq-search i {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--apple-gray-400);
    font-size: 1.25rem;
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--apple-gray-100);
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

.faq-question {
    padding: 24px 28px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.03), rgba(175, 82, 222, 0.03));
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.08), rgba(175, 82, 222, 0.08));
}

.faq-question h4 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #000000;
    flex: 1;
}

.faq-question i {
    font-size: 1.25rem;
    color: var(--apple-blue);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 28px;
}

.faq-item.active .faq-answer {
    max-height: 1000px;
    padding: 24px 28px;
}

.faq-answer p {
    margin: 0;
    line-height: 1.7;
    color: var(--apple-gray-600);
    font-size: 1rem;
}

/* ==================== RESPONSIVE DESIGN ==================== */

@media (max-width: 768px) {
    .flashcards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .flashcard {
        height: 280px;
    }
    
    .tryout-card {
        border-radius: 16px;
    }
    
    .tryout-header {
        padding: 24px;
    }
    
    .tryout-content {
        padding: 24px;
    }
    
    .quiz-container {
        padding: 24px;
    }
    
    .tool-grid {
        grid-template-columns: 1fr;
    }
    
    .results-breakdown {
        flex-direction: column;
        gap: 24px;
    }
}

/* ==================== ANIMATIONS ==================== */

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

.flashcard,
.tryout-card,
.tool-card,
.faq-item {
    animation: fadeInUp 0.5s ease;
    animation-fill-mode: both;
}

.flashcard:nth-child(1) { animation-delay: 0.05s; }
.flashcard:nth-child(2) { animation-delay: 0.1s; }
.flashcard:nth-child(3) { animation-delay: 0.15s; }
.flashcard:nth-child(4) { animation-delay: 0.2s; }
.flashcard:nth-child(5) { animation-delay: 0.25s; }
.flashcard:nth-child(6) { animation-delay: 0.3s; }
.flashcard:nth-child(7) { animation-delay: 0.35s; }
.flashcard:nth-child(8) { animation-delay: 0.4s; }
