:root {
    --bg-color: #0f172a;
    /* Slate 950 (Navy) */
    --text-color: #f8fafc;
    /* Slate 50 */
    --text-secondary: #cbd5e1;
    /* Slate 300 */
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --glass-bg: rgba(255, 255, 255, 0.1);
    /* More transparent */
    --glass-border: rgba(255, 255, 255, 0.15);
    --card-bg: rgba(255, 255, 255, 0.08);
    --accent-gradient: linear-gradient(135deg, #3b82f6, #6366f1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Effects */
.background-globes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.globe {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.globe-1 {
    width: 400px;
    height: 400px;
    background: #3b82f6;
    top: -100px;
    left: -100px;
    animation: float 10s infinite alternate;
}

.globe-2 {
    width: 500px;
    height: 500px;
    background: #8b5cf6;
    bottom: -150px;
    right: -150px;
    animation: float 15s infinite alternate-reverse;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(30px, 30px);
    }
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    margin: 0 15px;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover,
nav a.active {
    color: white;
}

/* Typography */
h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 15px;
    background: linear-gradient(to right, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

p {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 40px;
}

/* Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 80px 20px;
    max-width: 800px;
    margin: 0 auto;
}

/* Form Styles */
.logo-formglass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 30px;
    border-radius: 20px;
    width: 100%;
    padding: 30px;
    border-radius: 20px;
    width: 100%;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

/* Mode Toggle Removed */

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

input,
select {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

/* Fix for Select Options (Dropdown Visibility) */
select option {
    background-color: #1a1a2e;
    /* Dark background to match theme */
    color: white;
    /* White text */
}

input:focus,
select:focus {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.07);
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 15px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    padding: 8px 20px;
    background: transparent;
    border: 1px solid var(--glass-border);
    color: white;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: var(--glass-bg);
    border-color: white;
}

/* Advanced Options */
.advanced-toggle {
    text-align: center;
    margin-bottom: 20px;
    cursor: pointer;
    color: var(--primary-color);
    font-size: 0.9rem;
    user-select: none;
}

.hidden {
    display: none !important;
}

/* Results Section */
.results-section {
    padding: 40px 5%;
    border-top: 1px solid var(--glass-border);
    margin-top: 40px;
    min-height: 500px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

/* Grid */
.logos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.logo-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    /* Standard rounded, not fully rounded */
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
    cursor: pointer;
}

/* Ensure SVG scales nicely */
.logo-card svg {
    width: 80%;
    height: 80%;
    transition: transform 0.3s ease;
}

.logo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    /* Stronger shadow on dark bg */
}

/* Optional: Slight zoom on hover for the logo inside */
.logo-card:hover svg {
    transform: scale(1.05);
}


/* Brand Assets */
.brand-assets {
    margin-top: 60px;
    padding: 30px;
    background: var(--glass-bg);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
}

.asset-row {
    display: flex;
    gap: 30px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.asset-card {
    flex: 1;
    min-width: 250px;
}

.asset-card h4 {
    margin-bottom: 15px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.palette-container {
    display: flex;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
}

.color-box {
    flex: 1;
    height: 100%;
}

ul {
    list-style: none;
}

li {
    margin-bottom: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    font-size: 0.95rem;
}

/* Loader */
.loader {
    display: flex;
    align-items: center;
    gap: 10px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    width: 90%;
    max-width: 1000px;
    height: 80vh;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    position: relative;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    z-index: 9999;
    /* Changed from 10 to ensure top layer */
    width: 40px;
    /* Increase hit area */
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    /* Semi-transparent bg for visibility */
    border-radius: 50%;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-split {
    display: flex;
    height: 100%;
    gap: 30px;
}

.preview-area {
    flex: 2;
    background: #fff;
    /* Light bg for logo visibility */
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    background-image: linear-gradient(45deg, #ccc 25%, transparent 25%),
        linear-gradient(-45deg, #ccc 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #ccc 75%),
        linear-gradient(-45deg, transparent 75%, #ccc 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.preview-area svg {
    width: 90%;
    height: 90%;
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}

.message {
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.message.ai {
    background: rgba(59, 130, 246, 0.2);
    align-self: flex-start;
    color: #e0e0e0;
}

.message.user {
    background: rgba(255, 255, 255, 0.1);
    text-align: right;
    color: white;
}

.chat-input-wrapper {
    display: flex;
    gap: 10px;
}

.chat-input-wrapper input {
    flex: 1;
}

.chat-input-wrapper button {
    padding: 0 20px;
    background: var(--primary-color);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
}

.chat-input-wrapper button:hover {
    background: var(--primary-hover);
}

/* Inspiration Section */
.inspiration-container {
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.section-header-small {
    margin-bottom: 20px;
    text-align: center;
}

.section-header-small h3 {
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.section-header-small p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Logo Grid */
.logos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    /* Wider cards */
    gap: 40px;
    padding: 20px 0;
}

/* Premium Card Style */
.logo-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Subtle border */
    border-radius: 20px;
    padding: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.logo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.logo-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(59, 130, 246, 0.2);
    /* Glow effect */
    background: rgba(255, 255, 255, 0.05);
}

.logo-card svg {
    width: 220px;
    height: 220px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
    /* Depth for the logo itself */
    transition: transform 0.3s ease;
}

.logo-card:hover svg {
    transform: scale(1.05);
}

.inspiration-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.inspiration-card {
    background: white;
    padding: 15px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s ease;
}

.inspiration-card:hover {
    transform: translateY(-3px);
}

.inspiration-card img {
    max-width: 100%;
    height: 50px;
    object-fit: contain;
}

.inspiration-card span {
    font-size: 0.8rem;
    color: #333;
    font-weight: 600;
    text-align: center;
}