/* Mobile Roadmap/Report Page Styles */

/* Page Background */
.mobile-roadmap-page {
    background-image: url(../img/m_mypage_bg.png);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    color: #f8fafc;
    padding-bottom: 40px;
}

/* Note: .top_status styles are in /m_archive/css/common.css via mypage_header.html */

.mobile-roadmap-main {
    max-width: 430px;
    margin: 50px auto;
    padding: 0 16px;
}

/* Header Section */
.mobile-roadmap-header-section {
    padding: 30px 0 24px;
    text-align: center;
}

.mobile-roadmap-main-title {
    font-size: 24px;
    font-weight: bold;
    color: #ffffff;
    margin: 0 0 12px;
    text-align: center;
}

.mobile-roadmap-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 24px;
    text-align: center;
    line-height: 1.5;
}

/* View Sections */
.mobile-roadmap-view {
    display: none;
    padding: 20px 0;
}

.mobile-roadmap-view.active {
    display: block;
}

/* Loading State */
.mobile-loading {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.7);
}

.mobile-loading i {
    font-size: 48px;
    animation: spin 1s linear infinite;
    display: block;
    margin-bottom: 16px;
}

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

/* Roadmap Cards Container */
.mobile-roadmap-cards-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

/* Card Styles */
.mobile-roadmap-card {
    /* background: #ffffff; */
    border: 1px solid #8b8b8b;
    border-radius: 16px;
    overflow: hidden;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Card top section - thumbnail on left, content on right */
.mobile-card-top {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.mobile-card-thumbnail {
    width: 90px;
    min-width: 80px;
    height: 65px;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

/* AI Chatbot icon - hidden */
.mobile-card-ai-icon {
    display: none;
}

.mobile-card-step-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(139, 92, 246, 0.95);
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    z-index: 1;
}

/* Content section - to the right of thumbnail */
.mobile-card-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.mobile-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
    margin-bottom: 4px;
}

.mobile-card-description {
    font-size: 13px;
    color: #fff;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-card-meta {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

/* Card Actions Container (for delete + start buttons) */
.mobile-card-actions {
    display: flex;
    flex-direction: row;
    gap: 8px;
    width: 100%;
}

/* Card Remove Button (로드맵에서 제외) - Only in 찜한 콘텐츠 */
.mobile-card-remove-btn {
    border-radius: 10px;
    border: 0.5px solid var(--line, #9494D4);
    background: rgba(27, 27, 39, 0.50);
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);
    color: #FFF;
    font-family: "Pretendard Variable", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    letter-spacing: 0.18px;
    opacity: 0.7;
    cursor: pointer;
    padding: 14px;
    text-align: center;
    transition: all 0.3s ease;
    flex: 1;
    min-height: 48px;
}

.mobile-card-remove-btn:hover {
    opacity: 1;
}

.mobile-card-remove-btn:active {
    opacity: 0.5;
    transform: scale(0.98);
}

/* Card Button */
.mobile-card-cta {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 48px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Purple gradient button */
.mobile-card-cta.purple {
    border-radius: 7px;
    background: #8C52C9;;
}

.mobile-card-cta.purple:hover {
    background: linear-gradient(232deg, #1a3bb0 5.66%, #0090c7 83.03%);
}

.mobile-card-cta.purple:active {
    transform: scale(0.98);
}

/* Blue gradient button */
.mobile-card-cta.blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.mobile-card-cta.blue:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.mobile-card-cta.blue:active {
    transform: scale(0.98);
}

/* Report View Styles */
.mobile-report-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

/* First 3 cards span full row */
.mobile-report-stats-row .mobile-report-stat-card:nth-child(1),
.mobile-report-stats-row .mobile-report-stat-card:nth-child(2),
.mobile-report-stats-row .mobile-report-stat-card:nth-child(3) {
    grid-column: span 1;
}

/* 4th and 5th cards (completed/uncompleted) on same row - each takes half */
.mobile-report-stats-row .mobile-report-stat-card:nth-child(4) {
    grid-column: 1 / 2.5;
}

.mobile-report-stats-row .mobile-report-stat-card:nth-child(5) {
    grid-column: 2.5 / 4;
}

@media (max-width: 375px) {
    .mobile-report-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mobile-report-stats-row .mobile-report-stat-card:nth-child(4),
    .mobile-report-stats-row .mobile-report-stat-card:nth-child(5) {
        grid-column: span 1;
    }
}

.mobile-report-stat-card {
    background: linear-gradient(93deg, rgba(98, 98, 141, 0.30) 3.36%, rgba(27, 27, 39, 0.30) 99.24%);
    border: 1px solid #4D4D6E;
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);
}

.mobile-report-stat-card .stat-title {
    font-size: 14px;
    color: #fff;
    margin-bottom: 8px;
    font-weight: 600;  
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-report-stat-card .stat-value {
    font-size: 16px;
    font-weight: 300;
    color: #fff;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Completed courses card - blue background */
.mobile-report-stat-card:nth-child(4) {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: 1px solid #60a5fa;
}

/* In-progress courses card - gray background */
.mobile-report-stat-card:nth-child(5) {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    border: 1px solid #9ca3af;
}

/* Download card (6th card) - purple gradient */
.mobile-report-stat-card:nth-child(6),
.mobile-report-download-card {
    cursor: pointer;
    background: linear-gradient(135deg, rgba(140, 90, 239, 0.3), rgba(96, 52, 176, 0.3));
    border: 1px solid rgba(140, 90, 239, 0.5);
    grid-column: 1 / -1;
}

.mobile-report-stat-card:nth-child(6):hover,
.mobile-report-download-card:hover {
    background: linear-gradient(135deg, rgba(140, 90, 239, 0.4), rgba(96, 52, 176, 0.4));
    border-color: rgba(140, 90, 239, 0.7);
    transform: translateY(-2px);
}

.mobile-report-download-card .stat-value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.mobile-report-download-card .stat-value i {
    font-size: 20px;
}

/* Chart Section */
.mobile-report-chart-section {
    margin-bottom: 32px;
}

.mobile-report-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
}

.mobile-report-chart-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.mobile-report-download-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    border: 1px solid rgba(139, 92, 246, 0.5);
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.mobile-report-download-btn:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.5);
    transform: translateY(-2px);
}

.mobile-report-download-btn:active {
    transform: translateY(0) scale(0.98);
}

.mobile-report-download-btn i {
    font-size: 18px;
}

.mobile-report-chart-container {
    border-radius: 12px;
    padding: 16px;
    height: 250px;
    position: relative;
}

.mobile-report-chart-container canvas {
    max-height: 100%;
}

/* AI Coach Section */
/* .mobile-ai-coach-section {
    margin-top: 40px;
    padding: 24px 0;
} */

.mobile-ai-coach-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.mobile-ai-coach-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.mobile-ai-coach-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-ai-coach-card {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 16px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.mobile-ai-coach-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.4) 0%, rgba(139, 92, 246, 0.4) 100%);
}

.mobile-ai-coach-card h4 {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 12px;
}

.mobile-ai-coach-card p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin: 0;
}

/* Responsive */
@media (max-width: 375px) {
    .mobile-roadmap-main {
        padding: 0 12px;
    }
    
    .mobile-roadmap-main-title {
        font-size: 22px;
    }
}

/* Touch targets */
button, .mobile-card-cta {
    min-height: 44px;
    touch-action: manipulation;
}

/* Mobile Section Title - 찜한 콘텐츠 */
.mobile-section-title {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    padding: 0;
    line-height: 1.3;
}

.mobile-myroadmap-header {
    margin-bottom: 24px;
    padding: 0;
}

@media (max-width: 375px) {
    .mobile-section-title {
        font-size: 22px;
    }
}
