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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 25%, #16213e 50%, #0f3460 75%, #533483 100%);
    min-height: 100vh;
    color: #e2e8f0;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 35, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: all 0.3s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-brain {
    font-size: 4rem;
    color: #00d4ff;
    margin-bottom: 30px;
    animation: brainPulse 2s ease-in-out infinite;
}

.loading-text h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.loading-text p {
    font-size: 1.1rem;
    color: #a8edea;
    margin-bottom: 30px;
    opacity: 0.9;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.loading-dots span {
    width: 12px;
    height: 12px;
    background: #00d4ff;
    border-radius: 50%;
    animation: dotBounce 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.loading-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes brainPulse {
    0%, 100% { 
        transform: scale(1);
        filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.5));
    }
    50% { 
        transform: scale(1.1);
        filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.8));
    }
}

@keyframes dotBounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 2.5rem;
    color: #ffd700;
}

.logo h1 {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #a8edea 50%, #fed6e3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    letter-spacing: -0.02em;
}

.tagline {
    font-size: 1.4rem;
    font-weight: 600;
    color: #a8edea;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 400;
    margin-bottom: 30px;
    color: #e2e8f0;
    line-height: 1.6;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Main content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Input section */
.input-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 
        0 25px 50px rgba(0,0,0,0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.input-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.input-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.instructions {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 10px;
}

.instructions p {
    margin: 0 0 12px 0;
    color: #00d4ff;
    font-size: 1rem;
}

.instructions ul {
    margin: 0;
    padding-left: 20px;
    color: #e2e8f0;
}

.instructions li {
    margin-bottom: 6px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.auto-suggestions {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
}

.auto-suggestions p {
    margin: 0 0 15px 0;
    color: #667eea;
    font-size: 1rem;
}

.suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.suggestion-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 20px;
    padding: 10px 18px;
    color: #e2e8f0;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    min-width: -webkit-fill-available;
    min-width: fit-content;
}

.suggestion-chip:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.suggestion-chip i {
    color: #667eea;
    font-size: 0.8rem;
}


.input-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 8px;
}

.input-label i {
    color: #00d4ff;
    font-size: 1.1rem;
}

.prompt-input {
    width: 100%;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    font-size: 1.1rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.prompt-input::placeholder {
    color: rgba(226, 232, 240, 0.6);
}

.prompt-input:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 
        0 0 0 3px rgba(0, 212, 255, 0.1),
        0 10px 25px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.analyze-btn {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 50%, #667eea 100%);
    color: white;
    border: none;
    padding: 18px 36px;
    border-radius: 16px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    align-self: flex-start;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
}

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

.analyze-btn:hover::before {
    left: 100%;
}

.analyze-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 212, 255, 0.4);
}

.analyze-btn:active {
    transform: translateY(-1px);
}

/* Results section */
.results-section {
    display: flex;
    flex-direction: column;
}

.results-section.hidden {
    display: none;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 30px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.section-title i {
    color: #00d4ff;
    font-size: 1.6rem;
}


/* Models section */
.models-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 
        0 25px 50px rgba(0,0,0,0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.models-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.models-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.model-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.model-item:hover {
    border-color: #00d4ff;
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 212, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.model-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 50%, #667eea 100%);
}

.model-name {
    font-weight: 600;
    color: #e2e8f0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.model-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(102, 126, 234, 0.2) 100%);
    border: 1px solid rgba(0, 212, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.2);
    transform: perspective(1000px) rotateX(10deg) rotateY(-5deg);
    transition: all 0.3s ease;
}

.model-icon:hover {
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg) scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
}

.model-name a {
    color: #00d4ff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.model-name a:hover {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

.company-badge {
    background: rgba(0, 212, 255, 0.2);
    color: #00d4ff;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(0, 212, 255, 0.3);
    margin-left: 8px;
}


.model-score {
    font-weight: 700;
    color: #00d4ff;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.performance-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.performance-badge {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 50%, #667eea 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
    position: relative;
    overflow: hidden;
}

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

.performance-badge:hover::before {
    left: 100%;
}

.performance-stars {
    display: flex;
    gap: 2px;
}

.star {
    color: #ffd700;
    font-size: 0.9rem;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.performance-level {
    font-size: 0.7rem;
    color: #a8edea;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Top Pick Badge */
.top-pick-badge {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 30%, #ffd700 70%, #ffed4e 100%);
    color: #1a1a2e;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 
        0 8px 32px rgba(255, 215, 0, 0.6),
        0 4px 16px rgba(255, 215, 0, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    transform: perspective(1000px) rotateX(15deg) rotateY(-5deg);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.top-pick-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transition: left 0.6s ease;
}

.top-pick-badge::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ffd700, #ffed4e, #ffd700, #ffed4e);
    border-radius: 32px;
    z-index: -1;
    opacity: 0.7;
    filter: blur(4px);
}

.top-pick-badge:hover {
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg) scale(1.05);
    box-shadow: 
        0 12px 40px rgba(255, 215, 0, 0.8),
        0 6px 20px rgba(255, 215, 0, 0.6),
        inset 0 2px 4px rgba(255, 255, 255, 0.4),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.top-pick-badge:hover::before {
    left: 100%;
}

.top-pick-badge i {
    font-size: 1.1rem;
    color: #1a1a2e;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
    animation: trophyGlow 2s ease-in-out infinite alternate;
}

@keyframes trophyGlow {
    0% {
        filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
    }
    100% {
        filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.8));
    }
}

/* Percentage Display */
.percentage-display {
    font-size: 1.4rem;
    font-weight: 800;
    color: #00d4ff;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.score-bar {
    width: 120px;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.score-fill {
    height: 100%;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 50%, #667eea 100%);
    border-radius: 4px;
    transition: width 0.8s ease;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

/* Category Rankings Section */
.category-rankings {
    margin: 50px 0;
    padding: 40px 0;
}

.rankings-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.rankings-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.rankings-title i {
    color: #ffd700;
    font-size: 1.6rem;
}

.category-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.category-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    text-decoration: none;
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.category-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00d4ff, #667eea, #ffd700);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.category-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #00d4ff;
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 212, 255, 0.2);
}

.category-btn:hover::before {
    transform: scaleX(1);
}

.category-btn i {
    font-size: 2rem;
    color: #00d4ff;
    transition: all 0.3s ease;
}

.category-btn:hover i {
    color: #ffd700;
    transform: scale(1.1);
}

.category-btn span {
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    transition: color 0.3s ease;
}

.category-btn:hover span {
    color: #ffffff;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 50px;
    color: rgba(226, 232, 240, 0.7);
    font-size: 0.95rem;
    font-weight: 400;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .logo h1 {
        font-size: 2.2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .input-section,
    .category-display,
    .models-section {
        padding: 20px;
    }
    
    .model-item {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .model-name {
        flex-direction: column;
        gap: 8px;
    }
    
    .company-badge {
        margin-left: 0;
        margin-top: 4px;
    }
    
    .categories-container {
        justify-content: center;
    }
    
    .suggestion-chips {
        justify-content: center;
        gap: 8px;
    }
    
    .suggestion-chip {
        font-size: 0.8rem;
        padding: 8px 14px;
        white-space: normal;
        text-align: center;
        min-height: 40px;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    
    .suggestion-chip i {
        font-size: 1rem;
    }
    
    .category-buttons {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .category-btn {
        padding: 15px;
    }
    
    .category-btn i {
        font-size: 1.5rem;
    }
    
    .category-btn span {
        font-size: 0.9rem;
    }
    
    .rankings-title {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .logo {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo h1 {
        font-size: 1.8rem;
    }
    
    .analyze-btn {
        width: 100%;
    }
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in {
    animation: slideIn 0.6s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
