/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.main-content.with-banner {
    margin-top: 52px;
}

/* Content Area - WIDER */
.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 0; /* No padding - screenshot is flush */
    position: relative;
    z-index: 1;
}

.content-wrapper {
    max-width: 1800px; /* Increased from 1400px */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Features Panel Above Screenshot - Single Feature View */
.features-panel {
    background: #0f172a;
    border-radius: 8px;
    padding: 12px 20px;
    border: 1px solid #334155;
    display: flex;
    align-items: flex-start; /* Align to top to allow expansion */
    gap: 16px;
    min-height: 100px; /* Minimum height, but allow growth */
    height: auto; /* Allow height to grow when content expands */
    box-sizing: border-box;
    position: relative;
    overflow: visible; /* Allow expanded content to show */
}

.features-panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    flex: 1; /* Take available space */
    min-width: 0; /* Allow flex item to shrink if needed */
    overflow: visible; /* Don't cut off content */
}

.features-panel-header h3 {
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
}

.feature-navigation {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    min-width: fit-content; /* Ensure navigation doesn't shrink */
    overflow: visible; /* Don't cut off button text */
}

.nav-button {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 6px;
    color: #cbd5e1;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0; /* Prevent button from shrinking */
    min-width: fit-content; /* Ensure button fits its content */
    overflow: visible; /* Don't cut off text */
}

.nav-button:hover:not(:disabled) {
    background: #334155;
    border-color: #475569;
    color: white;
}

.nav-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.nav-button.next-module {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #3b82f6;
    color: white;
    font-weight: 600;
}

.nav-button.next-module:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.feature-counter {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
    min-width: 45px;
    text-align: center;
    white-space: nowrap;
}

.features-list-horizontal {
    display: flex;
    align-items: flex-start; /* Align to top to allow expansion */
    flex: 1;
    overflow: visible; /* Allow expanded content to show */
    position: relative;
    min-height: 76px; /* Minimum height, but allow growth */
    height: auto; /* Allow height to grow when expanded */
    box-sizing: border-box;
    min-width: 0; /* Allow flex item to shrink */
}

.features-list-horizontal .hotspot-card {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    margin-bottom: 0;
    padding: 10px 16px;
    display: none; /* Hide all by default */
    opacity: 0;
    transition: opacity 0.3s ease;
    position: absolute;
    left: 0;
    right: 0;
    box-sizing: border-box;
    overflow: visible; /* Allow content to expand */
    align-items: flex-start !important; /* Allow content to stack vertically when expanded */
}

.features-list-horizontal .hotspot-card.active {
    display: flex; /* Show only active one */
    opacity: 1;
    position: relative;
    align-items: flex-start !important; /* Allow content to stack when expanded */
}

.features-list-horizontal .hotspot-card {
    transform: none !important; /* No translateX in horizontal view */
}

.features-list-horizontal .hotspot-card.active {
    padding: 10px 16px !important; /* Keep compact padding */
    transform: none !important;
}

.features-list-horizontal .hotspot-card .hotspot-desc {
    -webkit-line-clamp: 2; /* Show 2 lines max */
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.features-list-horizontal .hotspot-card.active .hotspot-desc {
    -webkit-line-clamp: 2; /* Keep 2 lines unless expanded */
    margin-top: 4px;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

.features-list-horizontal .hotspot-card.active .hotspot-desc.expanded {
    display: block !important;
    -webkit-line-clamp: unset !important;
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
}

.features-list-horizontal .show-more-btn {
    background: transparent;
    border: none;
    color: #60a5fa;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 0;
    margin-top: 2px;
    text-align: left;
    transition: color 0.15s ease;
    font-weight: 500;
}

.features-list-horizontal .show-more-btn:hover {
    color: #93c5fd;
    text-decoration: underline;
}

.features-list-horizontal .hotspot-card.active .hotspot-title {
    margin-bottom: 4px !important; /* Less space in horizontal view */
    white-space: normal; /* Allow title to wrap if needed */
    overflow: visible; /* Don't cut off text */
    text-overflow: unset; /* Remove ellipsis */
    overflow-wrap: break-word; /* Allow long words to break */
    word-wrap: break-word; /* Fallback */
}

/* Feature Dropdown */
.features-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    display: none;
    margin-top: 8px;
}

.features-dropdown.show {
    display: block !important;
}

.features-dropdown-item {
    padding: 12px 16px;
    border-bottom: 1px solid #334155;
    cursor: pointer;
    transition: background 0.15s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.features-dropdown-item:hover {
    background: #334155;
}

.features-dropdown-item.active {
    background: rgba(59, 130, 246, 0.2);
    border-left: 3px solid #3b82f6;
}

.features-dropdown-item-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    color: white;
    flex-shrink: 0;
}

.features-dropdown-item-content {
    flex: 1;
    min-width: 0;
}

.features-dropdown-item-title {
    font-size: 13px;
    font-weight: 600;
    color: white;
    margin-bottom: 2px;
}

.features-dropdown-item-desc {
    font-size: 11px;
    color: #94a3b8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.features-dropdown-item-check {
    flex-shrink: 0;
    color: #22c55e;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.features-dropdown-item.completed .features-dropdown-item-check {
    opacity: 1;
}

/* Instruction Banner */
.instruction-banner {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    gap: 12px;
}

.instruction-icon {
    width: 32px;
    height: 32px;
    background: #06b6d4;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.instruction-content h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.instruction-content p {
    font-size: 14px;
    color: #cbd5e1;
    line-height: 1.5;
}

/* Start Tour Banner */
.start-tour-banner {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.start-tour-banner h3 {
    font-size: 18px;
    margin-bottom: 4px;
}

.start-tour-banner p {
    font-size: 14px;
    opacity: 0.9;
}

.start-tour-banner button {
    background: white;
    color: #0f172a;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    white-space: nowrap;
}

.start-tour-banner button:hover {
    transform: translateY(-2px);
}

/* Screenshot Container - RESPONSIVE WITH LOCKED ASPECT RATIO */
.screenshot-container {
    position: relative;
    background: transparent;
    border-radius: 0;
    border: none;
    box-shadow: none;
    overflow: hidden;
    z-index: 1;
    /* contain: layout style paint; */ /* Disabled - may interfere with aspect ratio calculations */
    
    /* Lock aspect ratio to match screenshot dimensions exactly */
    width: 100%;
    max-width: 100%;
    margin: 0;
    /* aspect-ratio is now set dynamically via JavaScript based on actual image dimensions */
    /* aspect-ratio: 2508 / 1297; */ /* Exact screenshot ratio: 2508x1297px - DISABLED, using dynamic JS */
}

.screenshot-container img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain; /* Scales but maintains aspect ratio */
    object-position: center;
    opacity: 1;
    transition: opacity 0.15s ease-in-out;
}

#hotspotsContainer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 6;
    pointer-events: none;
}

#hotspotsContainer .hotspot-marker {
    pointer-events: all;
}

/* Quick Tips - REMOVED
.quick-tips {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.tip-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 16px;
}

.tip-card .emoji {
    font-size: 32px;
    margin-bottom: 8px;
}

.tip-card h4 {
    font-size: 16px;
    margin-bottom: 4px;
}

.tip-card p {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.5;
}
*/

/* Screenshot Modal */
.screenshot-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.screenshot-modal.active {
    opacity: 1;
}

.screenshot-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
}

.screenshot-modal-content {
    background: #1e293b;
    border: 2px solid #334155;
    border-radius: 12px;
    padding: 32px;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.screenshot-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #334155;
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.screenshot-modal-close:hover {
    background: #475569;
}

.screenshot-modal-content h2 {
    font-size: 24px;
    margin-bottom: 24px;
    padding-right: 50px;
}

.screenshot-gallery {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.screenshot-item {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    overflow: hidden;
}

.screenshot-item img {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 1px solid #334155;
}

.screenshot-info {
    padding: 16px;
}

.screenshot-info h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.screenshot-info p {
    font-size: 14px;
    color: #cbd5e1;
    line-height: 1.6;
}

/* Save Notification */
.save-notification {
    position: fixed;
    top: 80px;
    right: 24px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    font-weight: 600;
}

.save-notification.show {
    transform: translateX(0);
}

.save-notification svg {
    flex-shrink: 0;
}

/* ========================================
   WELCOME SCREEN - LIGHT VERSION
   ======================================== */

.welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-screen.hidden {
    display: none;
}

.welcome-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 41, 59, 0.98); /* Lighter background */
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.4s ease;
}

.welcome-content {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%); /* Much lighter */
    border: 2px solid #475569; /* Lighter border */
    border-radius: 16px;
    padding: 48px;
    max-width: 800px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.5s ease;
}

.welcome-icon {
    margin-bottom: 24px;
    background: white; /* White background for logo */
    padding: 20px;
    border-radius: 16px;
    display: inline-block;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

/* For letter "R" (if no logo image) */
.rapydo-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 40px;
    color: white;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

/* For actual logo image */
.rapydo-logo-img {
    width: 120px;
    height: auto;
    display: block;
}

.welcome-content h1 {
    font-size: 32px;
    margin-bottom: 12px;
    color: white; /* Pure white for better contrast */
    font-weight: 700;
}

.welcome-subtitle {
    font-size: 18px;
    color: #e2e8f0; /* Much lighter gray */
    margin-bottom: 32px;
}

.welcome-features {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 40px;
    padding: 24px;
    background: rgba(71, 85, 105, 0.4); /* Lighter semi-transparent */
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #cbd5e1; /* Lighter text */
    font-size: 14px;
}

.feature-item svg {
    color: #06b6d4;
    flex-shrink: 0;
}

.welcome-steps {
    margin-bottom: 32px;
}

.welcome-steps h3 {
    font-size: 20px;
    margin-bottom: 24px;
    color: white;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.step {
    background: rgba(71, 85, 105, 0.4); /* Lighter background */
    border: 1px solid #475569; /* Visible border */
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.step:hover {
    background: rgba(71, 85, 105, 0.6);
    border-color: #64748b;
    transform: translateY(-4px);
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
    margin: 0 auto 12px;
    color: white;
}

.step p {
    font-size: 14px;
    color: #e2e8f0; /* Lighter text */
    line-height: 1.4;
    margin: 0;
}

.welcome-start-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    color: white;
    border: none;
    padding: 16px 48px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
    margin-bottom: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.welcome-start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(59, 130, 246, 0.5);
}

.welcome-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #cbd5e1; /* Lighter text */
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

.welcome-checkbox input {
    cursor: pointer;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Responsive */
@media (max-width: 768px) {
    .welcome-content {
        padding: 32px 24px;
        margin: 16px;
    }
    
    .welcome-features {
        flex-direction: column;
        gap: 16px;
    }
    
    .steps-grid {
        grid-template-columns: 1fr 1fr;
    }
}