:root {
    --bg-color: #0f172a;
    --panel-bg: rgba(30, 41, 59, 0.7);
    --panel-border: rgba(255, 255, 255, 0.1);
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --accent: #06b6d4;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --input-bg: rgba(15, 23, 42, 0.6);
    --input-border: rgba(255, 255, 255, 0.15);
    --input-focus: rgba(139, 92, 246, 0.5);
    --readonly-bg: rgba(0, 0, 0, 0.3);
    --font-family: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow-x: hidden;
}

.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.5;
    animation: float 10s infinite alternate ease-in-out;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

.container {
    width: 100%;
    max-width: 800px;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.logo i {
    color: var(--accent);
}

.logo h1 {
    font-weight: 700;
}

.logo span {
    color: var(--primary);
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.row {
    display: flex;
    gap: 1.5rem;
}

.col {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

label i {
    color: var(--accent);
}

input, textarea, select {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-main);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: all 0.3s ease;
    appearance: none; /* remove default arrow for select */
}

/* Custom dropdown arrow for select */
select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}
select option {
    background: var(--bg-color);
    color: var(--text-main);
}
select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

input::placeholder, textarea::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--input-focus);
}

textarea {
    resize: vertical;
}

.readonly-field {
    background: var(--readonly-bg);
    color: var(--text-muted);
    cursor: not-allowed;
    border-color: transparent;
}
.readonly-field:focus {
    box-shadow: none;
    border-color: transparent;
}

.divider {
    border: 0;
    height: 1px;
    background: var(--panel-border);
    margin: 2rem 0;
}

.btn-primary {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), #6d28d9);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: var(--font-family);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--primary);
}

.btn-primary:active {
    transform: translateY(0);
}

.hidden {
    display: none;
}

.result-section {
    background: var(--panel-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.5s ease;
}

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

.result-section h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--accent);
}

.result-section p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.code-window {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}

.window-header {
    background: #1e1e1e;
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.dots {
    display: flex;
    gap: 6px;
}

.dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dots span:nth-child(1) { background: #ff5f56; }
.dots span:nth-child(2) { background: #ffbd2e; }
.dots span:nth-child(3) { background: #27c93f; }

.copy-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-muted);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

pre {
    padding: 1.5rem;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #e2e8f0;
    white-space: pre-wrap;
}

@media (max-width: 600px) {
    .row {
        flex-direction: column;
        gap: 0;
    }
}
