/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --primary-bg: #0a0a0f;
    --secondary-bg: #1a1a2e;
    --card-bg: rgba(26, 26, 46, 0.8);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --border-color: rgba(59, 130, 246, 0.3);
    
    /* Neon Colors */
    --neon-blue: #00d4ff;
    --neon-purple: #6366f1;
    --neon-cyan: #06ffa5;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    --gradient-secondary: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(99, 102, 241, 0.1));
    --gradient-hero: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    
    /* Fonts */
    --font-heading: 'JetBrains Mono', monospace;
    --font-body: 'Segoe UI', system-ui, sans-serif;
    
    /* Spacing */
    --container-padding: 2rem;
    --section-padding: 6rem 0;
    
    /* Animations */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

body {
    font-family: var(--font-body);
    background: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Effects */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        linear-gradient(180deg, var(--primary-bg) 0%, var(--secondary-bg) 100%);
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    animation: grid-move 20s linear infinite;
}

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

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

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

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 212, 255, 0.3);
    border-top: 3px solid var(--neon-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition);
}

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

.nav-brand h1 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--neon-blue);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-pro {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--neon-blue);
    border: 2px solid var(--neon-blue);
}

.btn-secondary:hover {
    background: var(--neon-blue);
    color: var(--primary-bg);
    transform: translateY(-2px);
}

.btn-pro {
    background: var(--gradient-primary);
    color: white;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3); }
    to { box-shadow: 0 4px 20px rgba(0, 212, 255, 0.6); }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 80px;
    background: var(--gradient-hero);
}

.hero-content {
    text-align: center;
    max-width: 800px;
    z-index: 1;
}

.animated-cube {
    position: absolute;
    top: 20%;
    right: 10%;
    z-index: 0;
}

.cube {
    width: 100px;
    height: 100px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate-cube 10s infinite linear;
}

.face {
    position: absolute;
    width: 100px;
    height: 100px;
    background: var(--gradient-secondary);
    border: 1px solid var(--neon-blue);
    backdrop-filter: blur(10px);
}

.face.front { transform: rotateY(0deg) translateZ(50px); }
.face.back { transform: rotateY(180deg) translateZ(50px); }
.face.right { transform: rotateY(90deg) translateZ(50px); }
.face.left { transform: rotateY(-90deg) translateZ(50px); }
.face.top { transform: rotateX(90deg) translateZ(50px); }
.face.bottom { transform: rotateX(-90deg) translateZ(50px); }

@keyframes rotate-cube {
    0% { transform: rotateX(0deg) rotateY(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg); }
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.hero-features {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.feature-badge {
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.875rem;
    backdrop-filter: blur(10px);
}

/* Tools Section */
.tools-section {
    padding: var(--section-padding);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.125rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.tool-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(20px);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

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

.tool-card:hover::before {
    left: 100%;
}

.tool-card:hover {
    transform: translateY(-5px);
    border-color: var(--neon-blue);
    box-shadow: 0 10px 40px rgba(0, 212, 255, 0.2);
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.tool-card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.tool-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.tool-features {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tool-features span {
    padding: 0.25rem 0.75rem;
    background: rgba(0, 212, 255, 0.1);
    color: var(--neon-blue);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Features Section */
.features-section {
    padding: var(--section-padding);
    background: var(--gradient-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-item {
    text-align: center;
    padding: 2rem;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-item h3 {
    font-family: var(--font-heading);
    margin-bottom: 1rem;
}

.feature-item p {
    color: var(--text-secondary);
}

/* Footer */
.footer {
    background: var(--secondary-bg);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    font-family: var(--font-heading);
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: var(--text-secondary);
}

.footer-links h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-links a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--neon-blue);
}

.footer-cta {
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    text-align: center;
    color: var(--text-muted);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    backdrop-filter: blur(20px);
    animation: slideIn 0.3s var(--bounce);
}

@keyframes slideIn {
    from { transform: translateY(50px) scale(0.9); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-family: var(--font-heading);
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 2rem;
}

.input-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.input-section textarea {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-body);
    resize: vertical;
    margin-bottom: 1rem;
}

.input-section textarea:focus {
    outline: none;
    border-color: var(--neon-blue);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.tool-options {
    margin-bottom: 1.5rem;
}

.option-group {
    margin-bottom: 1rem;
}

.option-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.option-group select {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
}

.output-section {
    margin-top: 2rem;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.output-actions {
    display: flex;
    gap: 0.5rem;
}

.output-text {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    min-height: 200px;
    white-space: pre-wrap;
    font-family: var(--font-body);
    line-height: 1.6;
}

.processing {
    text-align: center;
    padding: 2rem;
}

.processing .loading-spinner {
    margin: 0 auto 1rem;
}

/* Support Modal */
.support-modal .modal-body {
    text-align: center;
}

.support-options {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* Login Modal */
.login-modal form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-modal input {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
}

.login-modal input:focus {
    outline: none;
    border-color: var(--neon-blue);
}

.login-note {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
        --section-padding: 4rem 0;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .animated-cube {
        display: none;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .support-options {
        flex-direction: column;
    }
}