/* ModelML-inspired Design System */
:root {
    --primary-dark: #0f1419;
    --primary-hover: #1a2332;
    --secondary-dark: #2d3748;
    --background-light: #f7fafc;
    --background-white: #ffffff;
    --border-light: #e2e8f0;
    --text-primary: #1a202c;
    --text-secondary: #718096;
    --text-muted: #a0aec0;
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--background-light);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Navigation Bar */
.navbar {
    background: var(--background-white);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(15, 20, 25, 0.1);
    margin-right: 8px;
}

.brand-text {
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: -1px;
    color: var(--primary-dark);
}

.brand-divider {
    color: var(--text-muted);
}

.brand-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
}

.nav-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.status-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Main Container */
.main-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
}

/* Hero Section */
.hero-section {
    background: var(--background-white);
    border-radius: 16px;
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.hero-logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.hero-logo {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(15, 20, 25, 0.15);
}

.hero-content {
    text-align: center;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 400;
    letter-spacing: -1px;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Search Wrapper */
.search-wrapper {
    max-width: 500px;
    margin: 0 auto;
}

.search-input-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.autocomplete-container {
    position: relative;
    flex: 1;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--background-white);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    margin-top: 4px;
    box-shadow: var(--shadow-lg);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    
    /* Hide scrollbar for all browsers */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.autocomplete-dropdown::-webkit-scrollbar {
    display: none;
}

.autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    transition: background-color 0.2s;
}

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

.autocomplete-item:hover,
.autocomplete-item.selected {
    background-color: var(--background-light);
}

.autocomplete-company {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.autocomplete-name {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

.autocomplete-type {
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: var(--background-light);
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.autocomplete-details {
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: var(--background-light);
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

/* No results message */
.autocomplete-no-results {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.no-results-icon {
    font-size: 1.5rem;
}

.no-results-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.no-results-hint {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Input validation states */
.search-input.valid-input {
    border-color: #10b981;
    background-color: rgba(16, 185, 129, 0.05);
}

.search-input.invalid-input {
    border-color: #ef4444;
    background-color: rgba(239, 68, 68, 0.05);
}

.search-input.valid-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.search-input.invalid-input:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.search-input {
    flex: 1;
    min-width: 300px;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.analyze-button {
    padding: 0.875rem 2.5rem;
    background: var(--primary-dark);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.analyze-button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.analyze-button:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

/* Quick Select */
.quick-select {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.quick-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.quick-buttons {
    display: flex;
    gap: 0.5rem;
}

.quick-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 2px solid var(--primary-dark);
    color: var(--primary-dark);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.quick-btn:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Progress Section - Carousel */
.analysis-progress {
    margin-bottom: 2rem;
}

.carousel-container {
    background: linear-gradient(135deg, var(--background-white) 0%, #f8f9fb 100%);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 2rem 2.5rem;
    box-shadow: 0 10px 40px rgba(15, 20, 25, 0.06);
    min-height: 420px;
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Clean container without overlapping elements */

.carousel-header {
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
    width: 100%;
}

.carousel-title {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: -0.5px;
    color: var(--primary-dark);
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
    line-height: 1.3;
    margin: 0;
}

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

/* Carousel Viewport - Enhanced for ModelML theme */
.carousel-viewport {
    height: 240px;
    position: relative;
    overflow: hidden;
    margin: 1rem 0 1.5rem 0;
    perspective: 1200px;
    perspective-origin: 50% 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.carousel-track {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Carousel Cards - Enhanced centering and ModelML aesthetics */
.carousel-card {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 50%;
    top: 45%;
    transform: translate(-50%, -45%) translateY(30px) scale(0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: none;
    will-change: transform, opacity;
    padding: 1.5rem;
    text-align: center;
}

.carousel-card.entering {
    animation: simpleEnter 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.carousel-card.active {
    opacity: 1;
    transform: translate(-50%, -45%) translateY(0) scale(1);
    z-index: 10;
}

.carousel-card.exiting {
    animation: simpleExit 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes simpleEnter {
    0% {
        opacity: 0;
        transform: translate(-50%, -45%) translateY(40px) scale(0.92);
    }
    60% {
        opacity: 1;
        transform: translate(-50%, -45%) translateY(-5px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -45%) translateY(0) scale(1);
    }
}

@keyframes simpleExit {
    0% {
        opacity: 1;
        transform: translate(-50%, -45%) translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -45%) translateY(-40px) scale(0.92);
    }
}

.carousel-icon {
    font-size: 3.5rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(15, 20, 25, 0.04) 100%);
    border-radius: 16px;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

.carousel-text {
    font-size: 1.25rem;
    color: var(--primary-dark);
    text-align: center;
    font-weight: 500;
    letter-spacing: -0.3px;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.carousel-subtext {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 0.25rem;
    max-width: 350px;
    line-height: 1.5;
    opacity: 0.85;
}

/* Progress Indicators - ModelML themed */
.carousel-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1rem;
    position: relative;
    z-index: 1;
    width: 100%;
}

.progress-dots {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
}

.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e2e8f0;
    transition: all 0.3s ease;
    cursor: default;
    position: relative;
}

.progress-dot.completed {
    background: var(--accent-green);
    transform: scale(1.1);
}

.progress-dot.completed::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 3px;
    height: 3px;
    background: white;
    border-radius: 50%;
}

.progress-dot.active {
    background: var(--accent-blue);
    transform: scale(1.3);
    animation: dotPulse 1.5s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(59, 130, 246, 0);
    }
}

.progress-percentage {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: -0.3px;
    display: inline-block;
    text-align: center;
}

/* Additional carousel enhancements for perfect centering */
.carousel-card > * {
    margin: 0 auto;
}

.carousel-card.entering,
.carousel-card.active,
.carousel-card.exiting {
    display: flex !important;
}

/* Ensure smooth transitions between states */
.carousel-card {
    pointer-events: none;
}

/* Clean container state */
.carousel-container.loading {
    box-shadow: 0 10px 40px rgba(15, 20, 25, 0.06);
}

/* Results Dashboard */
.results-dashboard {
    display: grid;
    gap: 2rem;
}

/* Score Summary Card */
.score-summary-card {
    background: var(--background-white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 3rem;
}

.score-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.company-name {
    font-size: 1.75rem;
    font-weight: 400;
    letter-spacing: -1px;
    color: var(--text-primary);
}

.analysis-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.score-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.score-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.score-ring {
    position: relative;
    width: 200px;
    height: 200px;
}

.score-svg {
    width: 100%;
    height: 100%;
}

.score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-number {
    display: block;
    font-size: 3rem;
    font-weight: 400;
    letter-spacing: -1px;
    color: var(--text-primary);
}

.score-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.readiness-badge {
    padding: 0.5rem 1.5rem;
    background: var(--background-light);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Score Breakdown */
.breakdown-title {
    font-size: 1.125rem;
    font-weight: 400;
    letter-spacing: -1px;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.component-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.score-component {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
}

.score-component-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.score-component-value {
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: -1px;
    color: var(--text-primary);
}

/* Insights Grid */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.insight-card {
    background: var(--background-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s;
}

.insight-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.insight-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.tech-icon { background: rgba(59, 130, 246, 0.1); color: var(--accent-blue); }
.news-icon { background: rgba(16, 185, 129, 0.1); color: var(--accent-green); }
.web-icon { background: rgba(245, 158, 11, 0.1); color: var(--accent-orange); }
.industry-icon { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }

.insight-title {
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: -1px;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.insight-value {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Strategy Section */
.strategy-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.decision-card,
.approach-card {
    background: var(--background-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.section-title {
    font-size: 1.125rem;
    font-weight: 400;
    letter-spacing: -1px;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.decision-makers-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.decision-maker {
    padding: 1rem;
    background: var(--background-light);
    border-radius: 8px;
    border-left: 3px solid var(--accent-blue);
}

.decision-maker-name {
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: -1px;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.decision-maker-title {
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: -1px;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.decision-maker-approach {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-style: italic;
}

.approach-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.approach-section {
    padding: 1rem;
    background: var(--background-light);
    border-radius: 8px;
}

.approach-section h4 {
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: -1px;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.approach-section p,
.approach-section ul {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.approach-section ul {
    list-style: none;
    padding-left: 1rem;
}

.approach-section li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.25rem;
}

.approach-section li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent-blue);
}

/* Action Bar */
.action-bar {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
    padding: 2rem 0;
}

.action-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.action-button svg {
    flex-shrink: 0;
}

.action-button.primary {
    background: var(--primary-dark);
    color: white;
}

.action-button.primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.action-button.secondary {
    background: transparent;
    color: var(--primary-dark);
    border: 2px solid var(--primary-dark);
}

.action-button.secondary:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-container {
        padding: 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .search-input-group {
        flex-direction: column;
    }
    
    .analyze-button {
        width: 100%;
        justify-content: center;
    }
    
    .quick-select {
        flex-direction: column;
    }
    
    .quick-buttons {
        width: 100%;
        flex-direction: column;
    }
    
    .quick-btn {
        width: 100%;
    }
    
    .score-main {
        grid-template-columns: 1fr;
    }
    
    .strategy-section {
        grid-template-columns: 1fr;
    }
    
    .action-bar {
        flex-direction: column;
    }
    
    .action-button {
        width: 100%;
        justify-content: center;
    }
}