/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #00ffff;
    --secondary: #ff00ff;
    --accent: #ffff00;
    --bg-dark: #0a0a0f;
    --bg-darker: #050507;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --glow-color: rgba(0, 255, 255, 0.5);
    --grid-color: rgba(0, 255, 255, 0.1);
}

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Cyber Grid Background */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 1;
}

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Navigation */
.cyber-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(5, 5, 7, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--primary);
    z-index: 1000;
    animation: glitch-border 3s infinite;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    flex-direction: column;
}

.glitch {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--text-primary);
    position: relative;
    text-shadow: 0.05em 0 0 var(--secondary), -0.05em -0.025em 0 var(--primary);
    animation: glitch 725ms infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-top 1s infinite linear alternate-reverse;
    color: var(--secondary);
    z-index: -1;
}

.glitch::after {
    animation: glitch-bottom 1.5s infinite linear alternate-reverse;
    color: var(--primary);
    z-index: -2;
}

.logo-badge {
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
    box-shadow: 0 0 10px var(--glow-color);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 100%;
}

.nav-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-indicator {
    width: 10px;
    height: 10px;
    background: #00ff00;
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 10px #00ff00;
}

/* Main Content */
.main-content {
    position: relative;
    z-index: 2;
    padding-top: 80px;
    min-height: 100vh;
}

/* Hero Section */
.hero-section {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    padding: 4rem;
    max-width: 1400px;
    margin: 0 auto;
    gap: 4rem;
}

.hero-content {
    flex: 1;
}

.hero-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 4rem;
    line-height: 1.2;
    margin-bottom: 2rem;
}

.title-line {
    display: block;
}

.gradient-text {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-flow 3s ease infinite;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-bottom: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 20px var(--glow-color);
    animation: glow-pulse 2s infinite;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
}

/* Cyber Button */
.cyber-button {
    position: relative;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    overflow: hidden;
    transition: 0.3s;
    z-index: 1;
}

.cyber-button span {
    position: absolute;
    display: block;
}

.cyber-button span:nth-child(1) {
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary));
    animation: btn-anim1 2s linear infinite;
}

.cyber-button span:nth-child(2) {
    top: -100%;
    right: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, transparent, var(--primary));
    animation: btn-anim2 2s linear infinite;
    animation-delay: 0.5s;
}

.cyber-button span:nth-child(3) {
    bottom: 0;
    right: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(270deg, transparent, var(--primary));
    animation: btn-anim3 2s linear infinite;
    animation-delay: 1s;
}

.cyber-button span:nth-child(4) {
    bottom: -100%;
    left: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(360deg, transparent, var(--primary));
    animation: btn-anim4 2s linear infinite;
    animation-delay: 1.5s;
}

.cyber-button.primary {
    background: rgba(0, 255, 255, 0.1);
    color: var(--primary);
    border: 1px solid var(--primary);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.cyber-button.secondary {
    color: var(--text-primary);
    border: 1px solid var(--text-secondary);
}

.cyber-button.small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.cyber-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px var(--glow-color);
}

/* Hero Visual */
.hero-visual {
    flex: 1;
    position: relative;
    height: 500px;
}

.cyber-sphere {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle at 30% 30%, var(--primary), transparent 70%);
    border-radius: 50%;
    filter: blur(20px);
    opacity: 0.3;
    animation: sphere-pulse 4s ease-in-out infinite;
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
}

.element {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--primary);
    animation: float 6s infinite;
}

.element:nth-child(1) { top: 20%; left: 30%; animation-delay: 0s; }
.element:nth-child(2) { top: 60%; left: 70%; animation-delay: 2s; }
.element:nth-child(3) { top: 80%; left: 40%; animation-delay: 4s; }

/* Features Section */
.features-section {
    padding: 4rem;
    background: rgba(5, 5, 7, 0.8);
    backdrop-filter: blur(10px);
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.title-decoration {
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.feature-card {
    position: relative;
    padding: 2rem;
    background: rgba(10, 10, 15, 0.5);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    transition: 0.3s;
    cursor: pointer;
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: 0.5s;
    pointer-events: none;
}

.feature-card:hover .card-glow {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.2);
}

.card-icon {
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Generate Page */
.generate-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.page-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    text-align: center;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.generate-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.glass-panel {
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.input-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.label-char-count {
    color: var(--primary);
}

.cyber-textarea {
    width: 100%;
    height: 150px;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    resize: none;
    transition: 0.3s;
}

.cyber-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.prompt-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.example-chip {
    padding: 0.5rem 1rem;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 20px;
    color: var(--text-primary);
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.9rem;
}

.example-chip:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.generate-btn {
    width: 100%;
    margin-top: 2rem;
}

.btn-loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.output-title {
    font-size: 1.2rem;
    color: var(--primary);
}

.output-status {
    padding: 0.3rem 0.8rem;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid var(--primary);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--primary);
}

.image-container {
    min-height: 300px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px dashed rgba(0, 255, 255, 0.3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.image-placeholder {
    text-align: center;
    color: var(--text-secondary);
}

.image-placeholder svg {
    margin-bottom: 1rem;
    opacity: 0.5;
}

.generated-image {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
}

.output-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 255, 255, 0.2);
}

.generation-time {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* API Page */
.api-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.api-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.api-card {
    padding: 2rem;
}

.api-card.full-width {
    grid-column: 1 / -1;
}

.api-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.api-card-header h2 {
    font-size: 1.5rem;
    color: var(--primary);
}

.api-badge {
    padding: 0.3rem 0.8rem;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--bg-dark);
}

.contact-info {
    margin-top: 1.5rem;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid var(--primary);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    transition: 0.3s;
}

.contact-link:hover {
    background: rgba(0, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.feature-list {
    list-style: none;
}

.feature-list li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
}

.feature-list li:last-child {
    border-bottom: none;
}

.code-block {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.code-block pre {
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.api-note {
    padding: 1rem;
    background: rgba(255, 255, 0, 0.1);
    border: 1px solid var(--accent);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    color: var(--accent);
}

.pricing-info {
    background: rgba(0, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1.5rem;
}

.pricing-info h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.pricing-info ul {
    list-style: none;
    margin-top: 0.5rem;
}

.pricing-info li {
    color: var(--text-secondary);
    padding: 0.3rem 0;
}

/* Animations */
@keyframes glitch {
    0% {
        text-shadow: 0.05em 0 0 var(--secondary), -0.05em -0.025em 0 var(--primary);
    }
    14% {
        text-shadow: 0.05em 0 0 var(--secondary), -0.05em -0.025em 0 var(--primary);
    }
    15% {
        text-shadow: -0.05em -0.025em 0 var(--secondary), 0.025em 0.025em 0 var(--primary);
    }
    49% {
        text-shadow: -0.05em -0.025em 0 var(--secondary), 0.025em 0.025em 0 var(--primary);
    }
    50% {
        text-shadow: 0.025em 0.05em 0 var(--secondary), 0.05em 0 0 var(--primary);
    }
    99% {
        text-shadow: 0.025em 0.05em 0 var(--secondary), 0.05em 0 0 var(--primary);
    }
    100% {
        text-shadow: 0.05em 0 0 var(--secondary), -0.05em -0.025em 0 var(--primary);
    }
}

@keyframes glitch-top {
    0% {
        transform: translate(-2px, -2px);
    }
    100% {
        transform: translate(2px, 2px);
    }
}

@keyframes glitch-bottom {
    0% {
        transform: translate(2px, 2px);
    }
    100% {
        transform: translate(-2px, -2px);
    }
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes glow-pulse {
    0%, 100% {
        text-shadow: 0 0 20px var(--glow-color);
    }
    50% {
        text-shadow: 0 0 40px var(--glow-color);
    }
}

@keyframes gradient-flow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes btn-anim1 {
    0% {
        left: -100%;
    }
    50%, 100% {
        left: 100%;
    }
}

@keyframes btn-anim2 {
    0% {
        top: -100%;
    }
    50%, 100% {
        top: 100%;
    }
}

@keyframes btn-anim3 {
    0% {
        right: -100%;
    }
    50%, 100% {
        right: 100%;
    }
}

@keyframes btn-anim4 {
    0% {
        bottom: -100%;
    }
    50%, 100% {
        bottom: 100%;
    }
}

@keyframes sphere-pulse {
    0%, 100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }
    50% {
        transform: translateY(-20px) scale(2);
        opacity: 1;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes glitch-border {
    0%, 100% {
        border-bottom-color: var(--primary);
    }
    25% {
        border-bottom-color: var(--secondary);
    }
    50% {
        border-bottom-color: var(--accent);
    }
    75% {
        border-bottom-color: var(--secondary);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-section {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .generate-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 2rem;
        flex-wrap: wrap;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .cyber-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .prompt-examples {
        justify-content: center;
    }
}