/* Global fonts */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700&family=Noto+Sans+KR:wght@400;700&display=swap');



/* Responsive Design System */
body {
    font-family: 'Noto Sans JP', 'Noto Sans KR', sans-serif;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Unified Container System - Mobile First */
.main-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

/* Responsive Container Widths */
@media (min-width: 480px) {
    .main-container {
        padding: 1rem;
    }
}

@media (min-width: 640px) {
    .main-container {
        max-width: 640px;
        padding: 1.5rem;
    }
}

@media (min-width: 768px) {
    .main-container {
        max-width: 768px;
        padding: 2rem;
    }
}

@media (min-width: 1024px) {
    .main-container {
        max-width: 1024px;
        padding: 2.5rem;
    }
}

/* Content Container for consistent width across pages */
.content-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

/* Unified Typography System */
.main-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5rem;
    color: #1f2937; /* Dark gray for a clean look */
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .main-title {
        font-size: 2.5rem;
        margin-bottom: 2rem;
    }
}

/* Shared simple card styles used on index listing */
.card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Shimmer placeholder effect */
.shimmer {
    background-color: #e2e8f0;
    animation: shimmer 1.5s infinite linear;
    background: linear-gradient(to right, #e2e8f0 0%, #f7fafc 50%, #e2e8f0 100%);
    background-size: 200% 100%;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Unified Card System */
.unified-card {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    width: 100%;
}

.unified-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

@media (min-width: 480px) {
    .unified-card {
        padding: 1.25rem;
        margin-bottom: 1rem;
        border-radius: 1rem;
    }
    
    .unified-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    }
}

@media (min-width: 640px) {
    .unified-card {
        padding: 1.5rem;
        border-radius: 1rem;
    }
    
    .unified-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    }
}

@media (min-width: 768px) {
    .unified-card {
        padding: 2rem;
        border-radius: 1.5rem;
    }
    
    .unified-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    }
}

/* Card Content Typography */
.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.375rem;
    line-height: 1.4;
}

.card-description {
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.5;
}

@media (min-width: 480px) {
    .card-title {
        font-size: 1.125rem;
        margin-bottom: 0.5rem;
    }
    
    .card-description {
        font-size: 0.875rem;
    }
}

@media (min-width: 640px) {
    .card-title {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }
    
    .card-description {
        font-size: 1rem;
    }
}

.question-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.question-item.visible {
    opacity: 1;
    transform: translateY(0px);
}

.question-item.hidden-fade-out {
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease-in, transform 0.3s ease-in;
}

.result-container-animation {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.result-container-animation.visible {
    opacity: 1;
    transform: scale(1);
}

/* Progress Bar and Quiz Animations */
.progress-bar-fill {
    transition: width 0.5s ease-in-out;
}

.question-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.question-item.visible {
    opacity: 1;
    transform: translateY(0px);
}

.question-item.hidden-fade-out {
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease-in, transform 0.3s ease-in;
}

.result-container-animation {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.result-container-animation.visible {
    opacity: 1;
    transform: scale(1);
}

/* Tab Interface Styles - Simple and Clean */
.tab-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e5e7eb; /* Light gray bottom border */
}

.tab-button {
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    color: #6b7280; /* Medium gray text */
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent; /* Transparent border for spacing */
    transition: color 0.3s ease, border-color 0.3s ease;
    text-decoration: none;
    cursor: pointer;
    margin: 0 0.5rem -2px; /* Negative margin to align with container border */
    white-space: nowrap;
}

.tab-button:hover {
    color: #374151; /* Darker gray on hover */
}

.tab-button.active {
    color: #4f46e5; /* Indigo color for active tab */
    border-bottom-color: #4f46e5; /* Active tab indicator */
}

@media (min-width: 640px) {
    .tab-button {
        padding: 1rem 1.5rem;
        font-size: 1.125rem;
    }
}

/* Fixed Bottom Buttons for Quiz */
.fixed-bottom-btns {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 50;
    padding: 1rem;
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
}

@media (min-width: 640px) {
    .fixed-bottom-btns {
        padding: 1.5rem;
        gap: 1rem;
        border-bottom-left-radius: 1.5rem;
        border-bottom-right-radius: 1.5rem;
    }
}

/* Post List Container and Items */
.post-list-container {
    width: 100%;
}

.post-list-item {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    margin-bottom: 0.75rem;
    background: white;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    text-decoration: none;
    color: #374151;
    min-height: 44px; /* Minimum touch target */
}

.post-list-item:last-child {
    margin-bottom: 0;
}

.post-list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.post-title-list {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.125rem;
    line-height: 1.4;
}

.post-filename-list {
    font-size: 0.6875rem;
    color: #9ca3af;
}

@media (min-width: 480px) {
    .post-list-item {
        padding: 1rem 1.25rem;
        border-radius: 1rem;
    }
    
    .post-title-list {
        font-size: 0.875rem;
    }
    
    .post-filename-list {
        font-size: 0.75rem;
    }
}

@media (min-width: 640px) {
    .post-list-item {
        padding: 1.25rem 1.5rem;
    }
    
    .post-title-list {
        font-size: 1rem;
    }
    
    .post-filename-list {
        font-size: 0.875rem;
    }
}

/* Footer Styling */
.site-footer {
    margin-top: 3rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.75rem;
    width: 100%;
}

@media (min-width: 640px) {
    .site-footer {
        font-size: 0.875rem;
        margin-top: 4rem;
    }
}

/* Responsive Utilities */
.responsive-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .responsive-container {
        max-width: 640px;
    }
}

@media (min-width: 768px) {
    .responsive-container {
        max-width: 768px;
    }
}

/* Removed old tab-button styles that are now replaced above */

/* Image Styling - Center and Full Width */
img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 0.5rem;
}

/* Responsive image container */
.image-container {
    width: 100%;
    margin: 1rem 0;
    text-align: center;
}

.image-container img {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Specific sizing for different contexts */
.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .card-image {
        height: 250px;
    }
}

@media (min-width: 1024px) {
    .card-image {
        height: 300px;
    }
}
