/* --- General Styles & Resets --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #0a0e1a; /* Dark base */
    color: #e0e0e0; /* Light text */
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll from gradient */
    position: relative; /* Needed for gradient positioning */
}

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

/* --- Animated Background Gradient --- */
.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 200%; /* Wider to allow smooth movement */
    height: 100%;
    z-index: -1;
    background: linear-gradient(110deg, #0a0e1a 20%, #1a0a2a 40%, #0a1f2a 60%, #110a1a 80%, #0a0e1a 100%);
    background-size: 200% 100%; /* Double width for animation */
    animation: gradient-shift 25s linear infinite;
    filter: blur(5px); /* Optional: soften the gradient */
    opacity: 0.6; /* Reduced opacity to let blobs show more */
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- Light Blobs --- */
.light-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.2;
    z-index: -1;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 149, 255, 0.6) 0%, rgba(0, 149, 255, 0) 70%);
    top: -200px;
    left: -100px;
    animation: drift-1 15s infinite alternate;
}

.blob-2 {
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(106, 0, 255, 0.5) 0%, rgba(106, 0, 255, 0) 70%);
    bottom: -300px;
    right: -200px;
    animation: drift-2 20s infinite alternate;
}

.blob-3 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(255, 0, 128, 0.4) 0%, rgba(255, 0, 128, 0) 70%);
    top: 40%;
    left: 30%;
    animation: drift-3 25s infinite alternate;
}

@keyframes drift-1 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

@keyframes drift-2 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-70px, -30px); }
}

@keyframes drift-3 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-50px, 50px); }
}

/* --- Header --- */
header {
    background-color: rgba(10, 14, 26, 0.8); /* Semi-transparent dark */
    backdrop-filter: blur(10px); /* Frosted glass effect */
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2.0em;
    font-weight: 700;
    /* Subtle gradient text matching logo */
    background: linear-gradient(90deg, #0793ac, #6de7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: #00d4ff; /* Fallback */
    text-decoration: none; /* Remove underline */
}

nav a {
    margin-left: 25px;
    text-decoration: none;
    color: #c0c0c0;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #ffffff;
}

.cta-button {
    background: linear-gradient(90deg, #007bff, #00a3bf);
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.cta-button:hover {
    box-shadow: 0 0 15px rgba(0, 163, 191, 0.6);
    transform: translateY(-2px);
}

/* --- Main Content Area --- */
.main-content {
    padding-top: 40px;
    min-height: calc(100vh - 200px);
}

/* --- Hero Section --- */
.hero {
    padding-top: 50px;
    padding-bottom: 30px;
    text-align: center;
    position: relative;
}

.hero h1 {
    font-size: 3.2em;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.2;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero p {
    font-size: 1.15em;
    color: #b0b0b0;
    max-width: 650px;
    margin: 0 auto 30px auto;
}

/* --- Gradient Text Styles --- */
.highlight {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Blue gradient for "Innovation Partner" */
.innovation-highlight {
    background: linear-gradient(90deg, #59ecff, #4c76ff); /* Light blue to blue gradient */
    color: #59ecff; /* Fallback */
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Pink-Purple gradient for "AI-powered" */
.ai-highlight {
    background: linear-gradient(90deg, #ab4cff, #ff69b4); /* Purple to pink gradient */
    color: #ab4cff; /* Fallback */
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Original gradient classes as fallback */
.gradient-main {
    background: linear-gradient(90deg, #59ecff, #5e00d1); /* Blue-to-Purple Gradient */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: #4ca1ff; /* Fallback */
}

.gradient-purple-pink {
    background: linear-gradient(90deg, #a777e3, #ff69b4); /* Purple-to-Pink Gradient */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: #a777e3; /* Fallback */
}

/* --- Query Box (AI Interaction) --- */
.query-box {
    max-width: 750px;
    margin: 0 auto 40px;
    background-color: rgba(26, 32, 50, 0.7);
    border-radius: 12px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
}

.query-label {
    display: block;
    text-align: left;
    font-weight: 600;
    margin-bottom: 10px;
    color: #d0d0d0;
}

textarea, input[type="text"] {
    width: 100%;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s;
    resize: vertical;
}

textarea:focus, input[type="text"]:focus {
    outline: none;
    border-color: #00c2ff;
    box-shadow: 0 0 0 2px rgba(0, 194, 255, 0.3);
}

/* --- Buttons --- */
button, .ai-button {
    background: linear-gradient(90deg, #007bff, #00a3bf);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

button:hover, .ai-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 194, 255, 0.3);
}

button:disabled, .ai-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* --- Loading Spinner --- */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
}

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

/* --- Processing Indicator --- */
.processing-indicator {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    margin-top: 20px;
}

.indicator-text {
    display: flex;
    align-items: center;
    color: #9de0ff;
    font-size: 0.95em;
    margin-bottom: 15px;
}

/* --- Typing Animation --- */
.typing-dots {
    display: inline-flex;
    align-items: center;
    margin-right: 10px;
}

.typing-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #9de0ff;
    margin-right: 5px;
    opacity: 0.4;
    animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(1) { animation-delay: 0.0s; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* --- Dynamic Tags --- */
.dynamic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

/* --- Parameters Tags --- */
.parameter-tag, .tag {
    display: inline-flex;
    align-items: center;
    background-color: rgba(0, 194, 255, 0.1);
    border: 1px solid rgba(0, 194, 255, 0.3);
    border-radius: 30px;
    padding: 6px 12px;
    font-size: 14px;
    color: #e0e0e0;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.parameter-tag span, .tag strong {
    color: #00c2ff;
    font-weight: 600;
    margin-right: 5px;
}

.parameter-tag.visible, .tag.visible {
    opacity: 1;
    transform: translateY(0);
}

.parameters-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

/* --- Results Section --- */
.results-container {
    margin-top: 40px;
}

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

.results-header h2 {
    margin: 0;
    color: #ffffff;
    font-size: 1.8em;
}

.actions a {
    color: #00c2ff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.actions a:hover {
    color: #6de7ff;
    text-decoration: underline;
}

.detail-section {
    margin-bottom: 30px;
    background-color: rgba(26, 32, 50, 0.5);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.section-title {
    font-size: 1.2em;
    margin-bottom: 15px;
    color: #ffffff;
}

/* --- Company Cards --- */
.company-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.company-card {
    background-color: rgba(26, 32, 50, 0.7);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.company-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 194, 255, 0.15);
    border-color: rgba(0, 194, 255, 0.3);
}

.company-card-link {
    display: block;
    padding: 25px;
    color: inherit;
    text-decoration: none;
    height: 100%;
}

.company-logo {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, #007bff, #00d4ff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 20px;
    margin-bottom: 15px;
}

.company-name {
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 10px;
    color: #ffffff;
}

.company-description {
    font-size: 0.95em;
    color: #b0b0b0;
    margin-bottom: 15px;
    height: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

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

.company-tag {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    padding: 4px 10px;
    font-size: 12px;
    color: #d0d0d0;
}

/* --- Alert Messages --- */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
}

.alert-success {
    background-color: rgba(46, 125, 50, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.alert-danger {
    background-color: rgba(183, 28, 28, 0.2);
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.alert-warning {
    background-color: rgba(245, 124, 0, 0.2);
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.alert-info {
    background-color: rgba(2, 119, 189, 0.2);
    border: 1px solid rgba(3, 169, 244, 0.3);
}

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

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

/* --- Responsive Styles --- */
@media (max-width: 992px) {
    .hero h1 { font-size: 2.8em; }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.4em; }
    .hero p { font-size: 1.05em; }
    header .container { flex-direction: column; gap: 10px;}
    nav { margin-top: 10px; }
    nav a { margin: 0 10px; }
    .company-grid { grid-template-columns: 1fr; }
}

@media (max-width: 576px) {
    .hero h1 { font-size: 2em; }
    .hero p { font-size: 1em; }
    .query-box { padding: 20px; }
    button { padding: 12px 20px; font-size: 1em; }
    .detail-section, .company-card-link { padding: 15px; }
}

/* Basic styling for the login popup */
.login-popup {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

.login-popup-content {
    background-color: #fefefe;
    margin: 15% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 400px;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
    border-radius: 8px;
    position: relative;
}

.login-popup-content h2 {
    text-align: center;
    margin-top: 0;
    color: #333; /* Ensure heading is dark too */
}

.login-popup-content form div {
    margin-bottom: 15px;
}

.login-popup-content label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
}

/* Restore normal styling for inputs with the .login-popup-input class */
.login-popup-input {
    display: block !important; /* Keep as block to ensure full width usage */
    width: calc(100% - 22px) !important; /* Standard width calculation */
    padding: 10px !important;
    border: 1px solid #ccc !important; /* Standard border */
    border-radius: 4px !important;
    background-color: #fff !important; /* White background */
    color: #333 !important; /* Dark text for input */
    margin-bottom: 15px !important; /* Spacing below input */
    font-size: 1rem !important; /* Standard font size */
    line-height: 1.5 !important;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1); /* Subtle inner shadow */
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    visibility: visible !important; /* Ensure it stays visible */
    opacity: 1 !important; /* Ensure it stays opaque */
    /* Remove aggressive z-index and position unless proven necessary again */
}

.login-popup-input:focus {
    border-color: #007bff; /* Highlight color on focus - match CTA */
    outline: 0;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1), 0 0 0 0.2rem rgba(0,123,255,.25); /* Focus glow */
}

.login-popup-content button[type="submit"] {
    background-color: #007bff; /* Match site's CTA blue */
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
}

.login-popup-content button[type="submit"]:hover {
    background-color: #0056b3; /* Darker blue on hover */
}

.close-btn {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.error-message {
    color: red;
    font-size: 0.9em;
    text-align: center;
} 