:root {
    --bg-dark: #09090b;
    --bg-darker: #050505;
    --primary: #f4f4f5;
    --primary-glow: rgba(244, 244, 245, 0.15);
    --secondary: #71717a;
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --glass-bg: rgba(24, 24, 27, 0.75);
    --glass-border: rgba(255, 255, 255, 0.08);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: transparent;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

h1, h2, h3, h4, .brand-name {
    font-family: 'Outfit', sans-serif;
}

/* Canvas Background */
#radarCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    background-color: #050505;
}

/* Utilities */
.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-panel {
    background: linear-gradient(145deg, rgba(30, 30, 30, 0.8), rgba(24, 24, 24, 0.8));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid #333;
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.glass-panel:hover {
    transform: translateY(-10px);
    border-color: #3b82f6;
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.2);
    background: linear-gradient(145deg, rgba(35, 35, 35, 0.9), rgba(28, 28, 28, 0.9));
}

.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #000000;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.4);
    transform: translateY(-5px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    color: #3b82f6;
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.2);
    transform: translateY(-5px);
}

.large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

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

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    object-fit: cover;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid transparent;
}

.logo.small {
    width: 30px;
    height: 30px;
}

.brand-name {
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.logo-container {
    cursor: pointer;
}

.logo-container:hover .logo {
    transform: translateY(-3px);
    border-color: #3b82f6;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
}

.logo-container:hover .brand-name {
    transform: translateY(-3px);
    color: #3b82f6;
    text-shadow: 0 0 15px rgba(59, 130, 246, 0.8);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: inline-block;
}

.nav-links a:hover {
    color: #3b82f6;
    text-shadow: 0 0 15px rgba(59, 130, 246, 0.8);
    transform: translateY(-3px);
}

/* Sections */
.section {
    padding: 8rem 2rem;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
}

.bg-darker {
    background-color: var(--bg-darker);
}

.mb-5 {
    margin-bottom: 3rem;
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 2rem 2rem;
    gap: 4rem;
}

.hero-content {
    flex: 1;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* Smartphone Mockup */
.smartphone-mockup {
    position: relative;
    width: 290px;
    height: 580px;
    background: #09090b; /* screen background */
    border-radius: 40px;
    border: 12px solid #1a1a1a; /* phone bezel */
    box-shadow: 0 0 0 2px #333, 0 30px 60px rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin: 0 auto;
}

/* Hidden Logo Reveal */
.logo-reveal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('assets/logo.jpg');
    background-size: 300px;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    z-index: -1;
    mix-blend-mode: screen;
    filter: grayscale(100%) contrast(150%) brightness(0.5);
    -webkit-mask-image: radial-gradient(circle 0px at 50% 50%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    mask-image: radial-gradient(circle 0px at 50% 50%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    opacity: 0.8;
}

/* Glass Glare for glossy effect */
.glass-glare {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.01) 40%,
        transparent 40.1%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 10;
}

.smartphone-mockup::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 30px;
    background: #1a1a1a;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    z-index: 20;
}

.smartphone-mockup::after {
    content: '';
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 5px;
    background: #444;
    border-radius: 10px;
    z-index: 20;
}

/* Widget Container */
.create-need-widget {
    width: 100%;
    padding: 15px;
    cursor: pointer;
    box-sizing: border-box;
}

.widget-card {
    background: #18181b;
    border-radius: 16px;
    padding: 15px;
    border: 1px solid #2a2a2a;
    box-shadow: 0 8px 30px rgba(0,0,0,0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.widget-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}

.widget-title {
    text-align: center;
    color: #fff;
    margin-bottom: 15px;
    margin-top: 0;
    font-size: 1.3rem;
    font-weight: 800;
}

.textarea-wrapper {
    position: relative;
    width: 100%;
    height: 160px;
    border-radius: 12px;
    overflow: hidden;
    background-color: #222;
    border: 1px solid #333;
    margin-bottom: 15px;
}

/* Ghost Image Overlay (Thumbnail) */
.suggestion-ghost-image {
    float: right;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    opacity: 0;
    pointer-events: none;
    margin-left: 15px;
    margin-bottom: 5px;
    margin-top: 5px;
    display: none;
}

.suggestion-ghost-image.show {
    display: block;
    animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}


/* The actual Textarea (Read-Only styling) */
.need-textarea {
    position: relative;
    z-index: 3;
    width: 100%;
    height: 100%;
    background: transparent;
    color: var(--text-main);
    border: none;
    padding: 15px;
    font-size: 0.85rem;
    line-height: 1.4;
    resize: none;
    box-sizing: border-box;
    outline: none;
    font-family: inherit;
}

/* Typewriter Cursor */
.typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background-color: var(--text-main); 
    vertical-align: middle;
    animation: blink 1s step-end infinite;
    margin-left: 2px;
}

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

/* Read-Only Overlay to handle clicks */
.click-shield {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
}


.submit-need-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid #444;
    color: #888;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.widget-card:hover .submit-need-btn {
    border-color: #00e5ff;
    color: #00e5ff;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
}

/* About Section */
#about .text-block {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

#about h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
}

#about p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 4rem;
}

.feature-card {
    text-align: left;
}

.feature-card .icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-muted);
}

/* Scenarios */
.scenarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.scenario-card {
    display: flex;
    flex-direction: column;
}

.scenario-card .tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 1rem;
    display: inline-block;
}

.scenario-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.scenario-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    flex-grow: 1;
}

@media (max-width: 768px) {
    .features-grid,
    .scenarios-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-top: 15px;
        padding-bottom: 30px;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    .features-grid::-webkit-scrollbar,
    .scenarios-grid::-webkit-scrollbar {
        display: none;
    }
    .feature-card,
    .scenario-card {
        flex: 0 0 85%;
        scroll-snap-align: center;
    }
}

/* Footer */
.footer {
    border-top: 1px solid var(--glass-border);
    padding: 3rem 2rem;
    background: var(--bg-darker);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.social-links a:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
    border-color: #3b82f6;
}

/* Animations */
.animate-up {
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.8s forwards cubic-bezier(0.2, 0.8, 0.2, 1);
}

.animate-fade-in {
    opacity: 0;
    animation: fadeIn 1s forwards ease-in-out;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* Responsive */
@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 8rem;
    }
    
    .hero h1 { font-size: 3.5rem; }
    
    .hero p { margin: 0 auto 2.5rem; }
    
    .hero-actions { justify-content: center; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 2.8rem; }
    #about h2 { font-size: 2.5rem; }
}

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

/* Language Dropdown */
.lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-btn {
    background: transparent;
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-btn img, .lang-menu a img {
    width: 18px;
    height: auto;
    border-radius: 2px;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lang-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0;
    background: #18181b;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-width: 120px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    z-index: 1000;
    overflow: hidden;
}

.lang-dropdown:hover .lang-menu {
    display: block;
}

.lang-menu a {
    color: var(--text-main);
    padding: 10px 15px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.lang-menu a:hover {
    background: var(--primary);
    color: #000;
}
