/* Showcase Section Styles */
.showcase-section {
    margin-top: 0;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out;
}

.showcase-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(67, 97, 238, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(114, 9, 183, 0.1) 0%, transparent 50%);
    z-index: 1;
}

.showcase-container {
    max-width: 1067px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    position: relative;
    z-index: 2;
}

/* Photo Carousel Styles */
.showcase-left {
    position: relative;
}

.photo-carousel {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    aspect-ratio: 1;
    width: 100%;
    margin: 0 auto;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 600"><defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:%234a90e2;stop-opacity:1" /><stop offset="100%" style="stop-color:%2350e3c2;stop-opacity:1" /></linearGradient></defs><rect width="800" height="600" fill="url(%23grad1)"/><circle cx="200" cy="150" r="50" fill="rgba(255,255,255,0.1)"/><circle cx="600" cy="450" r="80" fill="rgba(255,255,255,0.05)"/><text x="400" y="300" font-family="Arial" font-size="24" fill="white" text-anchor="middle">学习助手</text></svg>');
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photo-carousel:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.carousel-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide .carousel-image {
    width: 90%;
    height: 90%;
    object-fit: contain;
    background-size: contain !important;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.6s ease;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

.carousel-slide:hover .carousel-image {
        transform: translate(-50%, -50%) scale(1.02);
    }

.carousel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 2rem 1.5rem 1.5rem;
    transform: translateY(100%);
    transition: transform 0.4s ease-in-out;
}

.carousel-slide:hover .carousel-overlay,
.carousel-slide.active .carousel-overlay {
    transform: translateY(0);
}

.carousel-overlay h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: white;
}

.carousel-overlay h3 a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.carousel-overlay h3 a:hover {
    opacity: 0.9;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.carousel-overlay h3 a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease;
}

.carousel-overlay h3 a:hover::after {
    width: 100%;
}

.carousel-overlay p {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
}

.carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 10;
    width: 80%;
    max-width: 300px;
}

.indicator {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    border: none;
    min-width: 30px;
}

.indicator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0.8), white, rgba(255,255,255,0.8));
    transition: width 0.3s ease;
    border-radius: 2px;
}

.indicator:hover::before {
    width: 30%;
    transition: width 0.2s ease;
}

.indicator.active {
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 10px rgba(74, 144, 226, 0.4);
    transform: translateY(-1px);
}

.indicator.active::before {
    width: 100%;
    background: linear-gradient(90deg, #4a90e2, #50e3c2, #4a90e2);
    box-shadow: 0 0 8px rgba(74, 144, 226, 0.6);
    animation: progressFill 3s linear forwards, glowPulse 2s ease-in-out infinite;
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #4a90e2, #50e3c2, #4a90e2);
    border-radius: 2px;
    transition: width 0.3s ease;
    opacity: 0;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 2px;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 1px;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.6);
}

.indicator.active .progress-bar {
    opacity: 1;
}

@keyframes progressFill {
    0% { width: 0%; }
    100% { width: 100%; }
}

@keyframes pulseProgress {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

@keyframes glowPulse {
    0%, 100% { 
        box-shadow: 0 0 8px rgba(74, 144, 226, 0.6);
    }
    50% { 
        box-shadow: 0 0 15px rgba(74, 144, 226, 0.8), 0 0 25px rgba(80, 227, 194, 0.4);
    }
}

/* Right Side Boxes */
.showcase-right {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 1.5rem;
}

/* Quote Box Styles */
.quote-box {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    /* Remove fixed min-height to allow flexible sizing */
    height: 100%; /* Match parent container height */
    min-height: auto; /* Remove minimum height constraint */
}

.quote-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.quote-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(67, 97, 238, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
}

.quote-icon {
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    font-size: 1.5rem;
    color: rgba(67, 97, 238, 0.3);
    z-index: 2;
}

.quote-content {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.5rem 0;
}

.quote-text {
    font-size: 0.95rem; /* Reduced from 1.1rem for better mobile readability */
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 0.5rem;
    font-style: italic;
    text-align: center;
}

.quote-author {
    display: none; /* Hide author display */
}

.quote-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.quote-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.quote-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.quote-btn:hover::before {
    left: 100%;
}

.quote-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.quote-btn:active {
    transform: scale(0.95);
}

.quote-btn i {
    font-size: 1rem;
}

/* Quote Category Dropdown */
.quote-category-dropdown {
    display: flex;
    align-items: center;
    justify-content: center;
}

.quote-category-select {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border: 2px solid transparent;
    border-radius: 25px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    text-align: center;
    outline: none;
}

.quote-category-select:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

.quote-category-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.quote-category-select option {
    background: white;
    color: var(--text-primary);
    padding: 0.5rem;
}

/* Quote Header for Top Dropdown */
.quote-header {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
    padding-top: 0.5rem;
    animation: slideDownFadeIn 0.6s ease-out;
}

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

.quote-category-dropdown.top-center {
    position: relative;
    z-index: 10;
}

.quote-category-dropdown.top-center .quote-category-select {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.1);
}

.quote-category-dropdown.top-center .quote-category-select:hover {
    background: white;
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.15);
    transform: translateY(-2px);
}

.quote-category-dropdown.top-center .quote-category-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2), 0 6px 20px rgba(67, 97, 238, 0.15);
}

/* Language Toggle Buttons */
.quote-controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.quote-language-toggle {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
}

.quote-language-toggle.compact {
    gap: 0.125rem;
}

.quote-language-toggle.grouped {
    background: rgba(67, 97, 238, 0.1);
    border-radius: 20px;
    padding: 0.125rem;
    border: 1px solid rgba(67, 97, 238, 0.2);
}

.quote-language-toggle.grouped .language-toggle-btn {
    border: none;
    background: transparent;
    border-radius: 16px;
    padding: 0.375rem 0.75rem;
    min-width: 32px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.quote-language-toggle.grouped .language-toggle-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-color);
    transform: scale(0);
    border-radius: 16px;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.quote-language-toggle.grouped .language-toggle-btn.active::before {
    transform: scale(1);
}

.quote-language-toggle.grouped .language-toggle-btn:hover {
    background: rgba(67, 97, 238, 0.1);
    transform: none;
    box-shadow: none;
}

.quote-language-toggle.grouped .language-toggle-btn.active {
    color: white;
    box-shadow: 0 2px 8px rgba(67, 97, 238, 0.3);
    transform: none;
    background: transparent;
}

.quote-language-toggle.grouped .language-toggle-btn:focus {
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.4);
}

.language-toggle-btn {
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 32px;
    line-height: 1;
}

.language-toggle-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(67, 97, 238, 0.3);
}

.language-toggle-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.3);
}

.language-toggle-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 1px 6px rgba(67, 97, 238, 0.4);
}

.language-toggle-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(67, 97, 238, 0.3);
}

/* Keywords Box Styles */
.keywords-box {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.keywords-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.keywords-box::before {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(114, 9, 183, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
}

.keywords-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

.keywords-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.keyword-tag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    min-height: 48px;
    justify-content: center;
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.keyword-tag:nth-child(1) { animation-delay: 0.1s; }
.keyword-tag:nth-child(2) { animation-delay: 0.2s; }
.keyword-tag:nth-child(3) { animation-delay: 0.3s; }
.keyword-tag:nth-child(4) { animation-delay: 0.4s; }

.keyword-tag:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(67, 97, 238, 0.3);
    border-color: rgba(67, 97, 238, 0.2);
}

.keyword-tag:active {
    transform: translateY(0);
}

.keyword-tag i {
    font-size: 1.1rem;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.keyword-tag:hover i {
    color: white;
}

.keywords-footer {
    text-align: center;
    position: relative;
    z-index: 2;
}

.about-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--accent-color), #5a3a8a);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(114, 9, 183, 0.3);
}

.about-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(114, 9, 183, 0.4);
}

.about-link:active {
    transform: translateY(0);
}

.about-link i {
    transition: transform 0.3s ease;
}

.about-link:hover i {
    transform: translateX(4px);
}

/* AI Exploration Box Styles */
.ai-exploration-box {
    position: relative;
    overflow: hidden;
    padding: 0;
    background: linear-gradient(135deg, #fef7ff 0%, #f3e8ff 100%);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.8s ease-out;
    height: 100%; /* Ensure full height of container */
    display: flex; /* Use flexbox for proper height distribution */
    flex-direction: column; /* Stack content vertically */
}

.ai-exploration-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(67, 97, 238, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
}

.ai-exploration-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.ai-exploration-content {
    position: relative;
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 2;
    flex: 1; /* Allow content to fill available space */
}

.ai-exploration-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #581c87;
    margin-bottom: 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ai-exploration-text {
    flex: 1;
    margin-bottom: 1.5rem;
}

.ai-exploration-intro {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #4c1d95;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 500;
}

.ai-questions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ai-question-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.ai-question-item:nth-child(1) { animation-delay: 0.2s; }
.ai-question-item:nth-child(2) { animation-delay: 0.4s; }
.ai-question-item:nth-child(3) { animation-delay: 0.6s; }

.ai-question-item:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ai-question-item i {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.ai-question-item span {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #1e293b;
    font-weight: 500;
}

.ai-exploration-footer {
    text-align: center;
}

.ai-explore-btn {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.ai-explore-btn:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.ai-explore-btn i {
    margin-left: 0.25rem;
    transition: transform 0.3s ease;
}

.ai-explore-btn:hover i {
    transform: translateX(4px);
}

/* Tablet Styles (768px - 1024px) */
@media (min-width: 768px) {
    .showcase-container {
        grid-template-columns: 3fr 2fr;
        gap: 2rem;
        align-items: stretch; /* Ensure equal height columns */
    }
    
    .showcase-left {
        max-width: none;
        display: flex; /* Use flexbox for height control */
        flex-direction: column;
    }
    
    .photo-carousel {
        max-width: none;
        margin: 0;
        flex: 1; /* Allow carousel to fill available height */
        height: auto; /* Override fixed aspect ratio */
    }
    
    .showcase-right {
        height: 100%; /* Ensure right column takes full height */
    }
    
    .keywords-container {
        grid-template-columns: 1fr;
    }
    
    /* Photo Carousel Tablet Styles - Maintain square aspect ratio */
    .photo-carousel {
        aspect-ratio: 1;
        width: 100%;
        max-width: none;
        margin: 0;
    }
    
    /* AI Exploration Box Tablet Styles */
    .ai-exploration-content {
        padding: 1.5rem;
    }
    
    .ai-exploration-title {
        font-size: 1.4rem;
        margin-bottom: 1.25rem;
    }
    
    .ai-exploration-intro {
        font-size: 0.9rem;
        margin-bottom: 1.25rem;
    }
    
    .ai-questions {
        gap: 0.875rem;
    }
    
    .ai-question-item {
        padding: 0.625rem;
        gap: 0.625rem;
    }
    
    .ai-question-item i {
        font-size: 1rem;
    }
    
    .ai-question-item span {
        font-size: 0.85rem;
    }
    
    .ai-explore-btn {
        font-size: 0.95rem;
    }
}

/* Desktop Styles (>1024px) */
@media (min-width: 1025px) {
    .showcase-section {
        padding: 3rem 2rem;
    }
    
    .showcase-container {
        grid-template-columns: 3fr 2fr;
        gap: 2.5rem;
        max-width: 1244px;
        align-items: stretch; /* Ensure both columns stretch to same height */
        height: auto; /* Allow container to expand based on content */
    }
    
    .showcase-left {
        display: flex; /* Use flexbox to control height */
        flex-direction: column;
    }
    
    .photo-carousel {
        flex: 1; /* Allow carousel to grow to fill available height */
        height: auto; /* Override fixed aspect ratio */
        min-height: 500px; /* Ensure minimum height */
    }
    
    .showcase-right {
        gap: 2rem;
        height: 100%; /* Ensure right column takes full height */
        display: flex; /* Use flexbox for proper height distribution */
        flex-direction: column; /* Stack children vertically */
    }
    
    .quote-text {
        font-size: 1.2rem;
    }
    
    .keywords-container {
        grid-template-columns: 1fr 1fr;
    }
    
    /* AI Exploration Box Desktop Styles */
    .ai-exploration-content {
        padding: 2.5rem;
    }
    
    .ai-exploration-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }
    
    .ai-exploration-intro {
        font-size: 1.05rem;
        margin-bottom: 2rem;
    }
    
    .ai-questions {
        gap: 1.25rem;
    }
    
    .ai-question-item {
        padding: 1rem;
        gap: 1rem;
    }
    
    .ai-question-item i {
        font-size: 1.2rem;
    }
    
    .ai-question-item span {
        font-size: 1rem;
    }
    
    .ai-explore-btn {
        font-size: 1.1rem;
    }
    
    .carousel-overlay h3 {
        font-size: 1.75rem;
    }
    
    .carousel-overlay p {
        font-size: 1.125rem;
    }
    
    /* Desktop language toggle grouped styles */
    .quote-controls {
        gap: 1.5rem;
    }
    
    .quote-language-toggle.compact {
        gap: 0.375rem;
    }
    
    .quote-language-toggle.grouped {
        padding: 0.1875rem;
    }
    
    .quote-language-toggle.grouped .language-toggle-btn {
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
        min-width: 40px;
    }
    
    .language-toggle-btn {
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
        min-width: 40px;
    }
}

/* Tablet Optimizations */
@media (max-width: 768px) and (min-width: 481px) {
    .showcase-section {
        padding: 2rem 1.5rem;
        margin-top: 0; /* Header is no longer fixed */
    }
}

/* Mobile Optimizations */
@media (max-width: 480px) {
    .showcase-section {
        padding: 1.5rem 1rem;
        margin-top: 0; /* Header is no longer fixed */
    }
    
    .showcase-container {
        display: flex; /* Use flexbox for better mobile control */
        flex-direction: column;
        gap: 1rem;
    }
    
    .showcase-left,
    .showcase-right {
        width: 100%; /* Ensure equal width on mobile */
        max-width: 100%; /* Prevent overflow */
    }
    
    .photo-carousel {
        border-radius: 16px;
        touch-action: pan-y;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        aspect-ratio: 1; /* Maintain square aspect ratio on mobile */
        max-width: 100%; /* Ensure it doesn't overflow */
        margin: 0 auto; /* Center the carousel */
    }
    
    .quote-box,
    .keywords-box {
        padding: 1.5rem;
        border-radius: 16px;
        width: 100%; /* Ensure full width */
        box-sizing: border-box; /* Include padding in width calculation */
    }
    
    /* Mobile responsive styles for language toggle */
    .quote-language-toggle {
        margin-top: 0.75rem;
        gap: 0.375rem;
    }
    
    .language-toggle-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
        min-width: 50px;
    }
    
    .quote-controls {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .quote-category-dropdown {
        max-width: 180px;
    }
    
    .quote-language-toggle.compact {
        gap: 0.125rem;
    }
    
    .language-toggle-btn {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
        min-width: 30px;
    }
    
    .quote-text {
        font-size: 1rem;
    }
    
    .keywords-title {
        font-size: 1.25rem;
    }
    
    .keyword-tag {
        padding: 0.625rem 0.875rem;
        font-size: 0.9rem;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
    
    .quote-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .quote-category-select {
        font-size: 0.85rem;
        padding: 0.5rem 0.8rem;
        min-width: 110px;
    }
    
    .quote-header {
        margin-bottom: 0.5rem;
        padding-top: 0.125rem;
    }
    
    .quote-category-dropdown.top-center .quote-category-select {
        min-width: 110px;
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
    }
    
    /* New responsive styles for quote controls */
    .quote-controls {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .quote-category-dropdown {
        max-width: 180px;
    }
    
    .quote-language-toggle.compact {
        gap: 0.125rem;
    }
    
    .quote-language-toggle.grouped {
        padding: 0.0625rem;
    }
    
    .quote-language-toggle.grouped .language-toggle-btn {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
        min-width: 30px;
    }
    
    .language-toggle-btn {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
        min-width: 30px;
    }
    
    /* AI Exploration Box Mobile Styles */
    .ai-exploration-box {
        border-radius: 16px;
        min-height: 400px; /* Ensure minimum height for mobile */
    }
    
    .ai-exploration-content {
        padding: 1.25rem;
    }
    
    .ai-exploration-title {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
    
    .ai-exploration-intro {
        font-size: 0.875rem;
        margin-bottom: 1rem;
        line-height: 1.5;
    }
    
    .ai-questions {
        gap: 0.75rem;
    }
    
    .ai-question-item {
        padding: 0.5rem;
        gap: 0.5rem;
        min-height: 44px; /* Touch-friendly height */
        display: flex;
        align-items: center;
    }
    
    .ai-question-item i {
        font-size: 1rem;
        margin-top: 0;
    }
    
    .ai-question-item span {
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    .ai-explore-btn {
        font-size: 0.9rem;
    }
    
    .carousel-indicators {
        bottom: 0.75rem;
        width: 90%;
        max-width: 250px;
        gap: 0.5rem;
    }
    
    .indicator {
        height: 1px;
        min-width: 25px;
        border-radius: 0.5px;
    }
    
    .indicator.active::before {
        animation: progressFill 2.5s linear forwards;
    }
    
    /* New responsive styles for quote controls */
    .quote-controls {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .quote-category-dropdown {
        max-width: 180px;
    }
    
    .quote-language-toggle.compact {
        gap: 0.125rem;
    }
    
    .quote-language-toggle.grouped {
        padding: 0.0625rem;
    }
    
    .quote-language-toggle.grouped .language-toggle-btn {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
        min-width: 30px;
    }
    
    .language-toggle-btn {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
        min-width: 30px;
    }
}

/* Touch-friendly enhancements */
@media (hover: none) and (pointer: coarse) {
    .keyword-tag,
    .quote-btn,
    .about-link {
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .carousel-slide:hover .carousel-overlay {
        transform: translateY(0);
    }
    
    .carousel-slide:hover img {
        transform: none;
    }
    
    /* Enhanced touch targets for progress indicators */
    .carousel-indicators {
        gap: 0.75rem;
        width: 85%;
        max-width: 280px;
    }
    
    .indicator {
        height: 1px;
        min-height: 8px;
        min-width: 25px;
        border-radius: 0.5px;
    }
    
    .progress-bar {
        border-radius: 0.5px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .photo-carousel,
    .quote-box,
    .keywords-box {
        border: 2px solid var(--text-primary);
    }
    
    .indicator {
        border: 2px solid var(--text-primary);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .carousel-slide {
        transition: opacity 0.3s ease;
    }
    
    .carousel-slide img {
        transition: none;
    }
    
    .carousel-overlay {
        transition: none;
    }
    
    .keyword-tag,
    .quote-btn,
    .about-link {
        transition: none;
    }
}