@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-green: #00ff88;
    --primary-orange: #ff6b35;
    --primary-red: #ff4757;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --bg-primary: #000000;
    --bg-card: rgba(255, 255, 255, 0.05);
    --border-primary: rgba(255, 255, 255, 0.2);
    --shadow-glow: 0 0 30px rgba(0, 255, 136, 0.3);
    --code-bg: #1e1e1e;
    --code-text: #d4d4d4;
    --code-keyword: #569cd6;
    --code-string: #ce9178;
    --code-comment: #6a9955;
}

body {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: var(--primary-green);
    border-radius: 50%;
    opacity: 0.6;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 2;
}

.header {
    text-align: center;
    margin-bottom: 60px;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.2s forwards;
}

.main-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-green), var(--primary-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    text-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-primary);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease-out forwards;
}

.glass-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-glow);
    border-color: var(--primary-green);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), var(--primary-orange));
    transform-origin: left;
    transform: scaleX(0);
    z-index: 1000;
    transition: transform 0.3s ease;
}

@media (max-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }
    
    .main-title {
        font-size: 2.5rem;
    }
    
    .glass-card {
        padding: 20px;
    }
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 1rem;
    color: var(--text-secondary);
    text-align: center;
}

.form-input {
    width: 100%;
    max-width: 500px;
    padding: 12px 16px;
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin: 0 auto;
    display: block;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: var(--shadow-glow);
}

.custom-select {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 0 auto 20px;
    text-align: center;
}

.select-selected {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.select-selected:hover, .select-selected:focus {
    border-color: var(--primary-green);
    box-shadow: var(--shadow-glow);
}

.select-selected::after {
    content: '▼';
    font-size: 0.8rem;
    color: var(--primary-green);
}

.select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    display: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.select-options[aria-hidden="false"] {
    display: block;
    animation: slideDown 0.3s ease-out forwards;
}

.option {
    padding: 12px 16px;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s ease;
}

.option:hover, .option:focus {
    background: rgba(0, 255, 136, 0.1);
    color: var(--primary-green);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

.submit-btn {
    width: 100%;
    max-width: 200px;
    padding: 12px;
    background: linear-gradient(45deg, var(--primary-green), var(--primary-orange));
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 20px auto;
    display: block;
}

.submit-btn:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.submit-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

.code-output {
    background: var(--code-bg);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 20px;
    font-family: 'Source Code Pro', monospace;
    font-size: 0.9rem;
    color: var(--code-text);
    white-space: pre-wrap;
    min-height: 200px;
    overflow-x: auto;
}

/* Syntax highlighting for PlantUML */
.code-output .plantuml-keyword {
    color: var(--code-keyword);
}

.code-output .plantuml-string {
    color: var(--code-string);
}

.code-output .plantuml-comment {
    color: var(--code-comment);
}

.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.loader {
    text-align: center;
    position: relative;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid var(--border-primary);
    border-top: 6px solid var(--primary-green);
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
    position: relative;
    box-shadow: var(--shadow-glow);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.3) 0%, transparent 70%);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(0.8); opacity: 0.5; }
}

.loading-text {
    margin-top: 20px;
    font-size: 1.2rem;
    font-weight: 500;
    background: linear-gradient(45deg, var(--primary-green), var(--primary-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.loader .particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--primary-orange);
    opacity: 0.5;
    animation: float-particle 3s ease-in-out infinite;
}

.loader .particle:nth-child(2) { top: -20px; left: 20px; animation-delay: 0.3s; }
.loader .particle:nth-child(3) { top: 20px; right: 20px; animation-delay: 0.6s; }
.loader .particle:nth-child(4) { bottom: 20px; left: 10px; animation-delay: 0.9s; }

@keyframes float-particle {
    0%, 100% { transform: translate(0, 0); opacity: 0.5; }
    50% { transform: translate(10px, -10px); opacity: 0.8; }
}

.loading-overlay[aria-hidden="true"] {
    display: none;
}
.loading-overlay[aria-hidden="false"] {
    display: flex;
}