:root {
    --bg-main: #0b0f19;
    --bg-card: #131b2e;
    --bg-card-hover: #1a253e;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 153, 0, 0.3);
    
    --primary: #ff9900;
    --primary-hover: #ffaa22;
    --primary-glow: rgba(255, 153, 0, 0.25);
    
    --accent-cyan: #00f2fe;
    --accent-blue: #4facfe;
    --accent-purple: #9d4edd;
    
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Effects */
.app-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
}

.glow-1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -100px;
    right: -100px;
}

.glow-2 {
    width: 600px;
    height: 600px;
    background: var(--accent-purple);
    bottom: -150px;
    left: -150px;
}

.bg-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 24px 24px;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navbar */
.navbar {
    border-bottom: 1px solid var(--border-color);
    background: rgba(11, 15, 25, 0.7);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 16px 0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #ff9900, #ff5500);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.brand-name {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.brand-name .highlight {
    color: var(--primary);
}

.badge-aws {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #ff9900;
    background: rgba(255, 153, 0, 0.12);
    border: 1px solid rgba(255, 153, 0, 0.25);
    padding: 3px 10px;
    border-radius: 20px;
    margin-left: 10px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 40px 0 32px 0;
    max-width: 800px;
    margin: 0 auto;
}

.pill-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-cyan);
    background: rgba(0, 242, 254, 0.08);
    border: 1px solid rgba(0, 242, 254, 0.2);
    padding: 6px 14px;
    border-radius: 30px;
    margin-bottom: 16px;
}

.hero-section h1 {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.gradient-text {
    background: linear-gradient(135deg, #ffffff 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 16px;
    color: var(--text-muted);
}

/* Cards & Layout */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    backdrop-filter: blur(12px);
    transition: var(--transition);
}

.workspace-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

@media (max-width: 992px) {
    .workspace-grid {
        grid-template-columns: 1fr;
    }
}

.panel {
    display: flex;
    flex-direction: column;
    height: 620px;
}

.panel-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
}

.panel-header h2 {
    font-size: 17px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
}

.panel-header h2 i {
    color: var(--primary);
}

/* Input Panel Specifics */
.sample-pills {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sample-label {
    font-size: 12px;
    color: var(--text-dim);
}

.pill-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.pill-btn:hover {
    background: rgba(255, 153, 0, 0.15);
    border-color: var(--primary);
    color: var(--primary);
}

.input-wrapper {
    position: relative;
    padding: 16px 24px;
    flex: 1;

    display: flex;
    flex-direction: column;
}

textarea#raw-notes {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 14px;
    resize: none;
    outline: none;
    transition: var(--transition);
}

textarea#raw-notes:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-text:hover {
    color: #ef4444;
}

.input-wrapper .btn-text {
    position: absolute;
    bottom: 24px;
    right: 36px;
}

/* Controls */
.controls-section {
    padding: 12px 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.15);
}

.control-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    padding: 10px 12px;
    font-size: 13px;
    font-family: var(--font-sans);
    outline: none;
    transition: var(--transition);
    cursor: pointer;
}

.form-control:focus {
    border-color: var(--primary);
}

.action-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-weight: 600;
    border-radius: var(--radius-md);
    padding: 10px 18px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, #ff9900, #ff6600);
    color: #fff;
    box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ffaa22, #ff7711);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-outline {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-icon {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: var(--radius-sm);
}

.btn-large {
    width: 100%;
    padding: 14px;
    font-size: 16px;
}

/* Spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Output Panel Specifics */
.output-tabs {
    display: flex;
    gap: 4px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn.active {
    background: var(--bg-card-hover);
    color: var(--text-main);
}

.output-content-area {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
    position: relative;
}

/* Empty State */
.empty-state {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-muted);
    padding: 32px;
}

.empty-icon {
    font-size: 48px;
    color: var(--text-dim);
    margin-bottom: 16px;
    opacity: 0.6;
}

.empty-state h3 {
    font-size: 18px;
    color: var(--text-main);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    max-width: 320px;
}

/* Markdown Rendered Style */
.markdown-preview {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-main);
}

.markdown-preview h1, 
.markdown-preview h2, 
.markdown-preview h3 {
    color: var(--primary);
    margin-top: 16px;
    margin-bottom: 10px;
    font-weight: 700;
}

.markdown-preview h2 {
    font-size: 18px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
}

.markdown-preview h3 {
    font-size: 15px;
}

.markdown-preview ul, .markdown-preview ol {
    margin-left: 20px;
    margin-bottom: 14px;
}

.markdown-preview li {
    margin-bottom: 6px;
}

.markdown-preview strong {
    color: #fff;
}

.markdown-preview blockquote {
    border-left: 3px solid var(--primary);
    padding-left: 12px;
    color: var(--text-muted);
    margin: 12px 0;
}

code#raw-markdown-output {
    font-family: var(--font-mono);
    font-size: 13px;
    color: #a5f3fc;
    white-space: pre-wrap;
    word-break: break-word;
}

.output-actions-bar {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    background: rgba(0, 0, 0, 0.15);
}

/* History Section */
.history-section {
    padding: 24px;
    margin-bottom: 48px;
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.history-header h3 {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-header h3 i {
    color: var(--accent-cyan);
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.history-card {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: var(--transition);
}

.history-card:hover {
    border-color: var(--border-highlight);
    background: rgba(255, 153, 0, 0.05);
}

.history-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--text-dim);
}

.history-card-tag {
    background: rgba(255, 153, 0, 0.15);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.history-card-snippet {
    font-size: 13px;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.history-empty {
    color: var(--text-dim);
    font-size: 14px;
    grid-column: 1 / -1;
}

/* Modal */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    max-width: 520px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h3 i {
    color: var(--primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
}

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

.modal-body {
    padding: 24px;
}

.modal-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.aws-info-box {
    background: rgba(255, 153, 0, 0.06);
    border: 1px solid rgba(255, 153, 0, 0.2);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: 20px;
}

.aws-info-box h4 {
    font-size: 14px;
    color: var(--primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.aws-info-box ul {
    list-style: none;
    font-size: 13px;
    color: var(--text-muted);
}

.aws-info-box li {
    margin-bottom: 6px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

/* Toast */
.toast-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #10b981;
    color: #fff;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
    z-index: 300;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Footer */
.footer {
    margin-top: auto;
    padding: 24px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 13px;
    color: var(--text-dim);
}
