/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: 
        linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.8)),
        url('./New York Skyline At Night 4k Wallpaper Desktop.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    line-height: 1.6;
    min-height: 100vh;
    backdrop-filter: blur(5px);
    background-attachment: fixed;
}


/* Global scrollbar styling */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    background-clip: content-box;
}

::-webkit-scrollbar-corner {
    background: rgba(255, 255, 255, 0.05);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.01);
    backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 40px;
    min-height: calc(100vh - 40px);
    margin-top: 20px;
    margin-bottom: 20px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

/* Header styles */
.header {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 30px 40px;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    /* animation: shimmer 6s ease-in-out infinite; */
}

@keyframes shimmer {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.logo {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-icon {
    font-size: 48px;
}

.logo-text h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
}

.subtitle {
    font-size: 16px;
    opacity: 0.9;
    font-weight: 300;
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* User Info */
.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.user-role {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

/* Main content */
.main-content {
    padding: 40px;
    background: rgba(255, 255, 255, 0.02);
}

.steps-container {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

/* Step sections */
.step-section {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 40px;
    padding: 30px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.step-number {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.step-info h2 {
    font-size: 28px;
    font-weight: 600;
    color: white;
    margin-bottom: 5px;
}

.step-info p {
    font-size: 16px;
    color: white;
}

/* Intent grid */
.intent-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
    min-height: 420px;
}

.intent-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 36px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    min-height: 200px;
    justify-content: space-between;
}

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

.intent-card:hover::before {
    left: 100%;
}

.intent-card:hover {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-5px) scale(1.02);
    background: rgba(255, 255, 255, 0.12);
}

.intent-card.selected {
    border-color: rgba(102, 126, 234, 0.8);
    background: rgba(102, 126, 234, 0.2);
    backdrop-filter: blur(30px) saturate(200%);
    color: white;
    transform: translateY(-5px) scale(1.02);
    box-shadow: 
        0 12px 40px rgba(102, 126, 234, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.intent-icon {
    font-size: 32px;
}


.intent-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: white;
}

.card-description {
    font-size: 14px;
    color: white;
    margin-bottom: 20px;
    line-height: 1.5;
}

.funnel-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    background: rgba(102, 126, 234, 0.1);
    color: white;
    padding: 6px 12px;
    border-radius: 32px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.intent-card.selected .tag {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Funnel grid */
.funnel-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
    min-height: 400px;
}

.funnel-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 36px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 180px;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

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

.funnel-card:hover::before {
    left: 100%;
}

.funnel-card:hover:not(.disabled) {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-5px) scale(1.02);
    background: rgba(255, 255, 255, 0.12);
}

.funnel-card.selected {
    border-color: rgba(102, 126, 234, 0.8) !important;
    background: rgba(102, 126, 234, 0.2) !important;
    backdrop-filter: blur(30px) saturate(200%) !important;
    color: white !important;
    transform: translateY(-5px) scale(1.02) !important;
    box-shadow: 
        0 12px 40px rgba(102, 126, 234, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

.funnel-card.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.08);
    border-color: #e2e8f0;
}

.funnel-card.available {
    border-color: rgba(102, 126, 234, 0.6);
    background: rgba(102, 126, 234, 0.05);
}

.funnel-card.selected.available {
    border-color: rgba(102, 126, 234, 0.8) !important;
    background: rgba(102, 126, 234, 0.2) !important;
    backdrop-filter: blur(30px) saturate(200%) !important;
}

.funnel-icon {
    font-size: 40px;
    margin-bottom: 15px;
    display: inline-block;
}


.funnel-content h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 5px;
    color: white;
}

.funnel-title {
    font-size: 14px;
    opacity: 0.7;
    margin-bottom: 10px;
    font-weight: 500;
}

.funnel-description {
    font-size: 13px;
    opacity: 0.6;
    line-height: 1.4;
}

.funnel-card.selected .funnel-title,
.funnel-card.selected .funnel-description {
    opacity: 0.9;
}

/* Narrator Selection */
.narrator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.narrator-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 32px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.narrator-card:hover {
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.12);
}

.narrator-card.selected {
    border-color: rgba(102, 126, 234, 0.8);
    background: rgba(102, 126, 234, 0.2);
    backdrop-filter: blur(30px) saturate(200%);
    color: white;
    transform: translateY(-5px) scale(1.02);
    box-shadow: 
        0 12px 40px rgba(102, 126, 234, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.narrator-card.selected::before {
    content: '✓';
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    backdrop-filter: blur(10px);
}

.narrator-icon {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
}

.narrator-name {
    font-size: 18px;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
}

.narrator-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.narrator-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

@media (max-width: 768px) {
    .narrator-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .narrator-card {
        min-height: 100px;
        padding: 16px;
    }
    
    .narrator-icon {
        font-size: 28px;
        margin-bottom: 8px;
    }
    
    .narrator-name {
        font-size: 16px;
    }
    
    .narrator-description {
        font-size: 13px;
    }
}

/* Framework grid */
.framework-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
    min-height: 500px;
}

.framework-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 36px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 230px;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

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

.framework-card:hover::before {
    left: 100%;
}

.framework-card:hover:not(.disabled) {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-5px) scale(1.02);
    background: rgba(255, 255, 255, 0.12);
}

.framework-card.selected {
    border-color: rgba(102, 126, 234, 0.8) !important;
    background: rgba(102, 126, 234, 0.2) !important;
    backdrop-filter: blur(30px) saturate(200%) !important;
    color: white !important;
    transform: translateY(-5px) scale(1.02) !important;
    box-shadow: 
        0 12px 40px rgba(102, 126, 234, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

.framework-card.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.08);
    border-color: #e2e8f0;
}

.framework-card.recommended {
    border-color: rgba(102, 126, 234, 0.6);
    background: rgba(102, 126, 234, 0.05);
}

.framework-card.selected.recommended {
    border-color: rgba(102, 126, 234, 0.8) !important;
    background: rgba(102, 126, 234, 0.2) !important;
    backdrop-filter: blur(30px) saturate(200%) !important;
}

.framework-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.framework-icon {
    font-size: 32px;
    flex-shrink: 0;
}


.framework-info {
    flex: 1;
}

.framework-info h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 5px;
    color: white;
}

.framework-subtitle {
    font-size: 14px;
    color: white;
    font-weight: 500;
}

.framework-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.score-number {
    background: rgba(102, 126, 234, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.framework-card.selected .score-number {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.score-stars {
    font-size: 12px;
    color: white;
}

.framework-description {
    font-size: 14px;
    color: white;
    margin-bottom: 15px;
    line-height: 1.5;
}

.framework-structure {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.structure-item {
    background: rgba(102, 126, 234, 0.2);
    color: white;
    padding: 4px 8px;
    border-radius: 18px;
    font-size: 12px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.framework-card.selected .structure-item {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.structure-arrow {
    font-size: 12px;
    color: white;
    font-weight: bold;
}

.framework-why {
    font-size: 13px;
    color: white;
    line-height: 1.4;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
}

.framework-card.selected .framework-why {
    border-top-color: rgba(255, 255, 255, 0.2);
}

.why-text {
    font-style: italic;
}


/* Emotion Driver Styles */
.emotion-driver-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    max-width: none; /* Remove any width constraints to match framework section */
    min-width: 960px; /* Ensure parent has enough space for 3-column grid */
}

.framework-stages {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.stage-section {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 36px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: 100%;
    max-width: none; /* Match framework section width */
    min-width: 920px; /* Ensure stage section can contain 3-column grid */
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.stage-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    justify-content: space-between;
}

.stage-driver-count {
    background: rgba(102, 126, 234, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 20px;
    padding: 8px 16px;
    margin-left: auto;
}

.driver-count-text {
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.stage-number {
    background: rgba(102, 126, 234, 0.2);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(102, 126, 234, 0.4);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.stage-info {
    flex: 1;
}

.stage-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: white;
    margin-bottom: 3px;
}

.stage-info p {
    font-size: 14px;
    color: white;
}

.drivers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

/* Drivers navigation header */
.drivers-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 20px 15px 20px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    width: 100%;
    box-sizing: border-box;
}

.drivers-count {
    color: white !important;
    font-weight: 600;
    font-size: 14px;
}

.drivers-count .total-count {
    color: white !important;
    font-weight: 700;
}

.scroll-hint {
    color: white !important;
    background: none !important;
    backdrop-filter: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    font-size: 12px !important;
    font-style: italic !important;
    transition: all 0.3s ease !important;
    opacity: 0.7;
}

.scroll-hint:hover {
    opacity: 1 !important;
}

/* Pagination Styles */
.drivers-pagination-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    overflow: visible; /* Allow content to expand */
    max-width: none; /* Match framework section width */
    min-width: 920px; /* Ensure minimum width for 3 columns */
}

.drivers-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 22px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.drivers-count {
    font-size: 14px;
    color: white;
    font-weight: 500;
}

.drivers-count .current-range {
    font-weight: 700;
    color: white;
}

.drivers-count .total-count {
    font-weight: 700;
    color: white;
}

.drivers-nav-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid #e2e8f0;
    border-radius: 18px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    color: white;
}

.nav-btn:hover:not(:disabled) {
    border-color: white;
    background: #667eea;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.08);
    border-color: #e2e8f0;
    color: white;
}

.nav-arrow {
    font-weight: bold;
    font-size: 18px;
}

.page-indicator {
    font-size: 14px;
    color: white;
    font-weight: 500;
    min-width: 60px;
    text-align: center;
}

.page-indicator .current-page {
    font-weight: 700;
    color: white;
}

.drivers-grid-paginated {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    min-height: 400px;
    width: 100%;
    position: relative;
    animation: fadeInGrid 0.3s ease-out;
}

/* Simple 3x3 Grid Layout with Horizontal Scroll */
.drivers-grid-scroll {
    display: grid !important;
    grid-template-rows: repeat(3, 1fr) !important;
    grid-auto-flow: column !important;
    grid-auto-columns: 330px !important; /* 300px * 1.1 = 330px */
    gap: 15px !important;
    height: 1200px; /* Increase container height for taller cards (600px * 2 = 1200px) */
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
    box-sizing: border-box;
}

/* Simple card styling for grid */
.drivers-grid-scroll .driver-card {
    width: 308px !important; /* 280px * 1.1 = 308px */
    height: auto !important;
    min-height: 360px !important; /* 180px * 2 = 360px */
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* Additional specificity to override any conflicting styles */
.emotion-driver-container .drivers-grid-scroll .driver-card {
    margin: 0 !important;
    width: 308px !important; /* 280px * 1.1 = 308px */
}

.drivers-grid-scroll::-webkit-scrollbar {
    height: 12px;
}

.drivers-grid-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin: 0 20px;
}

.drivers-grid-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.drivers-grid-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    background-clip: content-box;
}

.drivers-grid-scroll::-webkit-scrollbar-corner {
    background: rgba(255, 255, 255, 0.05);
}

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

/* Responsive pagination */
@media (max-width: 768px) {
    .drivers-nav-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .drivers-nav-controls {
        justify-content: center;
    }
    
    .drivers-grid-paginated {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        min-height: auto;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .drivers-grid-paginated {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 12px;
    }
    
    .driver-card {
        padding: 20px;
        min-height: 240px;
    }
}


.driver-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 36px;
    padding: 25px;
    /* margin will be set by grid-specific rule */
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    min-height: 560px; /* 280px * 2 = 560px */
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

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

.driver-card:hover::before {
    left: 100%;
}

.driver-card:hover {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-2px) scale(1.02);
    background: rgba(255, 255, 255, 0.12);
}

.driver-card.selected:hover {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    border-color: #f56565;
}

.driver-card.selected:hover::after {
    content: 'Click to deselect';
    color: white;
    opacity: 1;
    font-weight: 600;
}

.driver-card.selected {
    border-color: rgba(102, 126, 234, 0.8);
    background: rgba(102, 126, 234, 0.2);
    backdrop-filter: blur(30px) saturate(200%);
    color: white;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 12px 40px rgba(102, 126, 234, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
}

.driver-card.disabled,
.driver-card.incompatible {
    opacity: 0.3 !important;
    pointer-events: none !important;
    filter: grayscale(70%);
    border-color: #ddd !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

.driver-card.incompatible .driver-name {
    color: white !important;
}

.driver-card.incompatible .driver-tag {
    background-color: #e0e0e0 !important;
    color: white !important;
}

.driver-card.selected::after {
    content: 'Click to deselect';
    position: absolute;
    bottom: 5px;
    right: 8px;
    font-size: 10px;
    opacity: 0.7;
    font-style: italic;
}

.driver-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.driver-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
    color: white;
}

.driver-emotion {
    font-size: 14px;
    color: white;
    font-weight: 500;
}

.driver-card.selected .driver-emotion {
    opacity: 0.9;
}

.driver-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.score-badge {
    background: rgba(102, 126, 234, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 32px;
    font-size: 16px;
    font-weight: 700;
    min-width: 50px;
    text-align: center;
}

.driver-card.selected .score-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.score-stars {
    font-size: 10px;
    opacity: 0.8;
}

.driver-description {
    font-size: 16px;
    color: white;
    line-height: 1.5;
    margin-bottom: 25px;
    margin-top: 15px;
    flex: 1;
}

.driver-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
    flex-shrink: 0;
}

.driver-tag {
    background: rgba(102, 126, 234, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: white;
    padding: 6px 14px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
}

.driver-card.selected .driver-tag {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.stage-complete {
    background: rgba(255, 255, 255, 0.08);
}

.stage-complete .stage-number {
    background: rgba(102, 126, 234, 0.3);
    backdrop-filter: blur(20px) saturate(200%);
    border-color: rgba(102, 126, 234, 0.6);
}

.no-drivers-message {
    text-align: center;
    padding: 40px 20px;
    color: white;
    font-style: italic;
}

/* Generation area */
.generation-area {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.selection-summary {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 36px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.summary-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: white;
}

.summary-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    padding: 15px;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.summary-label {
    font-weight: 600;
    color: white;
}

.summary-value {
    color: white;
    font-weight: 600;
    background: rgba(102, 126, 234, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(102, 126, 234, 0.3);
    padding: 5px 10px;
    border-radius: 18px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 32px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: rgba(102, 126, 234, 0.2);
    color: white;
    box-shadow: 
        0 8px 32px rgba(102, 126, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(102, 126, 234, 0.5);
}

.btn-primary:hover:not(:disabled) {
    box-shadow: 
        0 12px 40px rgba(102, 126, 234, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-2px) scale(1.02);
    background: rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.7);
}

.btn-primary:disabled {
    background: #cbd5e0;
    color: white;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px) scale(1.02);
    box-shadow: 
        0 6px 24px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-large {
    padding: 18px 36px;
    font-size: 16px;
    border-radius: 40px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 12px;
}

.btn-icon {
    font-size: 16px;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Script output */
.script-output {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 36px;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.output-header {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.output-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.script-content {
    padding: 25px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
}

.script-content textarea {
    width: 100%;
    min-height: 800px; /* 200px * 4 = 800px */
    border: 1px solid rgba(255, 255, 255, 0.2);
    outline: none;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: white;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    padding: 20px;
    border-radius: 24px;
    resize: vertical;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Scrollbar styling for textarea */
.script-content textarea::-webkit-scrollbar {
    width: 12px;
}

.script-content textarea::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin: 10px 0;
}

.script-content textarea::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.script-content textarea::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    background-clip: content-box;
}

.script-content textarea::-webkit-scrollbar-corner {
    background: rgba(255, 255, 255, 0.05);
}

/* Toast notifications */
/* Product Information Form */
.product-info-form {
    background: transparent;
    border-radius: 32px;
    padding: 24px;
    border: none;
}

.form-group {
    margin-bottom: 24px;
}

.form-group:last-of-type {
    margin-bottom: 0;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
    font-weight: 600;
    color: white;
    font-size: 14px;
}

.label-text {
    color: white;
}

.label-required {
    color: white;
    font-weight: 700;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 32px;
    font-size: 14px;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    color: white;
    transition: all 0.2s ease;
    box-sizing: border-box;
    resize: vertical;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: white;
}

.form-textarea {
    min-height: 80px;
    line-height: 1.5;
}

.input-hint {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    font-style: italic;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.form-actions .btn {
    flex: 1;
    justify-content: center;
}

@media (max-width: 768px) {
    .product-info-form {
        padding: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        flex: none;
    }
}

/* Product Info Status Indicator */
.product-info-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 32px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
}

.product-info-status.complete {
    background: rgba(46, 204, 113, 0.1);
    color: white;
}

.product-info-status.incomplete {
    background: rgba(231, 76, 60, 0.1);
    color: white;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    padding: 15px 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-left: none;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 350px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
}

.toast-error {
}

.toast-info {
}

.toast-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.toast-message {
    font-size: 14px;
    font-weight: 500;
    color: white;
}

.toast-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: white;
    margin-left: auto;
    padding: 0;
}

.toast-close:hover {
    color: white;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        margin: 0;
        border-radius: 0;
    }
    
    .header {
        padding: 20px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .logo {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .step-section {
        padding: 20px;
    }
    
    .intent-grid,
    .funnel-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-content {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}

/* Animation keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-section {
    animation: fadeIn 0.6s ease-out;
}

.step-section:nth-child(2) {
    animation-delay: 0.1s;
}

.step-section:nth-child(3) {
    animation-delay: 0.2s;
}

/* Loading states */
.btn.loading {
    pointer-events: none;
    position: relative;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Focus styles for accessibility */
.intent-card:focus,
.funnel-card:focus,
.btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .intent-card,
    .funnel-card {
        border-width: 3px;
    }
    
    .intent-card.selected,
    .funnel-card.selected {
        border-width: 4px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
