/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    color: #f8fafc;
    background: #0a0a0a;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header styles */
header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 2rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

header p {
    color: #a1a1aa;
    font-size: 1rem;
}

/* Card styles */
.card {
    background: #18181b;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    border: 1px solid #27272a;
}

.card h2 {
    color: #ffffff;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

/* Form styles */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

label {
    font-weight: 500;
    color: #d4d4d8;
    font-size: 0.875rem;
}

input[type="text"],
input[type="password"],
textarea {
    padding: 0.75rem 1rem;
    border: 1px solid #3f3f46;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: all 0.15s ease;
    background: #0a0a0a;
    color: #f8fafc;
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
    outline: none;
    border-color: #52525b;
    box-shadow: 0 0 0 3px rgba(82, 82, 91, 0.2);
}

/* Button styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.btn.primary {
    background: #0d9488;
    color: white;
}

.btn.primary:hover {
    background: #0f766e;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.btn.secondary {
    background: #374151;
    color: #f8fafc;
    border: 1px solid #4b5563;
}

.btn.secondary:hover {
    background: #4b5563;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Result sections */
.result {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #0a0a0a;
    border-radius: 6px;
    border-left: 3px solid #52525b;
}

.result h3 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.info-item {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #18181b;
    border-radius: 4px;
    border: 1px solid #27272a;
}

.info-item strong {
    display: block;
    margin-bottom: 0.25rem;
    color: #d4d4d8;
    font-size: 0.875rem;
}

code {
    background: #0a0a0a;
    color: #f9fafb;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    font-size: 0.75rem;
    word-break: break-all;
    display: block;
    margin-top: 0.25rem;
}

/* Warning styles */
.warning {
    background: #1c1917;
    border: 1px solid #44403c;
    color: #fbbf24;
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1rem;
    font-size: 0.875rem;
}

/* Editor styles */
.editor-container {
    margin: 1.5rem 0;
}

#json-editor {
    width: 100%;
    min-height: 200px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    font-size: 0.75rem;
    line-height: 1.4;
    resize: vertical;
}

.editor-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* Status messages */
.status {
    padding: 0.75rem;
    border-radius: 4px;
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.status.success {
    background: #052e16;
    border: 1px solid #166534;
    color: #86efac;
}

.status.error {
    background: #450a0a;
    border: 1px solid #7f1d1d;
    color: #fca5a5;
}

/* JSON output */
#json-output {
    background: #0f172a;
    color: #f9fafb;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    font-size: 0.75rem;
    line-height: 1.4;
    max-height: 300px;
    overflow-y: auto;
}

/* Utility classes */
.hidden {
    display: none;
}

/* Footer */
footer {
    text-align: center;
    color: #64748b;
    margin-top: 3rem;
    font-size: 0.875rem;
}

/* Notification System */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 6px;
    padding: 12px 16px;
    color: #f8fafc;
    font-size: 0.875rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
    max-width: 300px;
}

.notification.success {
    border-left: 3px solid #22c55e;
}

.notification.error {
    border-left: 3px solid #ef4444;
}

.notification.info {
    border-left: 3px solid #52525b;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}


/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .editor-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}