/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #512bd4;
    --secondary-color: #3c1e9e;
    --success-color: #34C759;
    --danger-color: #FF3B30;
    --warning-color: #FF9500;
    --info-color: #007AFF;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #1d1d1f;
    --text-secondary: #6c757d;
    --border-color: #dee2e6;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-primary: #1c1c1e;
    --bg-secondary: #2c2c2e;
    --bg-tertiary: #3a3a3c;
    --text-primary: #ffffff;
    --text-secondary: #98989d;
    --border-color: #48484a;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.4);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    transition: var(--transition);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Example Selector */
.example-selector {
    position: relative;
}

.example-dropdown {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    min-width: 200px;
}

.example-dropdown:hover {
    border-color: var(--primary-color);
}

.example-dropdown:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(81, 43, 212, 0.1);
}

.theme-btn {
    background: var(--bg-tertiary);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
}

.theme-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

/* Section Styles */
.editor-section,
.input-section,
.output-section {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.editor-section:hover,
.input-section:hover,
.output-section:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 600;
}

.section-header i {
    color: var(--primary-color);
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
        border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-info {
    background: var(--info-color);
    color: white;
}

.btn-info:hover {
    background: #0056b3;
}

.editor-controls,
.input-controls,
.output-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Editor Container */
.editor-container {
    height: 400px;
    border-bottom: 1px solid var(--border-color);
    border: 1px solid var(--border-color);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

#codeEditor {
    height: 100%;
    width: 100%;
}

/* Input Container */
.input-container {
    padding: 20px 30px;
}

#inputArea {
    width: 100%;
    height: 150px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.9rem;
    resize: vertical;
    transition: var(--transition);
}

#inputArea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(81, 43, 212, 0.1);
}

/* Output Container */
.output-container {
    padding: 20px 30px;
}

#outputArea {
    min-height: 200px;
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    line-height: 1.5;
}

.output-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 160px;
    color: var(--text-secondary);
    text-align: center;
}

.output-placeholder i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.output-success {
    color: var(--success-color);
    padding: 15px;
    border-radius: 8px;
    background: rgba(52, 199, 89, 0.1);
    border-left: 4px solid var(--success-color);
    margin-bottom: 15px;
}

.output-success i {
    margin-right: 8px;
}

.error-message {
    color: var(--danger-color);
    background: rgba(255, 59, 48, 0.1);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--danger-color);
    margin-bottom: 15px;
}

.error-message i {
    margin-right: 8px;
}

.output-info {
    color: var(--info-color);
    padding: 15px;
    border-radius: 8px;
    background: rgba(0, 122, 255, 0.1);
    border-left: 4px solid var(--info-color);
    margin-bottom: 15px;
}

.output-info i {
    margin-right: 8px;
}

/* Compilation Status */
.compilation-status {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
    padding: 15px 20px;
    z-index: 1000;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.compilation-status.hidden {
    transform: translateY(100px);
    opacity: 0;
    pointer-events: none;
}

.status-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
}

.status-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.status-text {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Enhanced Output Styling */
#outputArea .output-success strong,
#outputArea .error-message strong,
#outputArea .output-info strong {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

#outputArea .output-success pre,
#outputArea .error-message pre,
#outputArea .output-info pre {
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
    font-family: inherit;
}

/* C#-specific Monaco Editor styling */
.monaco-editor .token.keyword {
    color: #512bd4 !important;
    font-weight: bold;
}

.monaco-editor .token.string {
    color: #d69e2e !important;
}

.monaco-editor .token.comment {
    color: #6a737d !important;
    font-style: italic;
}

.monaco-editor .token.number {
    color: #005cc5 !important;
}

.monaco-editor .token.type {
    color: #6f42c1 !important;
}

.monaco-editor .token.namespace {
    color: #22863a !important;
}

.monaco-editor .token.class-name {
    color: #6f42c1 !important;
    font-weight: bold;
}

.monaco-editor .token.method {
    color: #005cc5 !important;
}

.monaco-editor .token.property {
    color: #e36209 !important;
}

/* Dark theme Monaco adjustments */
[data-theme="dark"] .monaco-editor .token.keyword {
    color: #c586c0 !important;
}

[data-theme="dark"] .monaco-editor .token.string {
    color: #ce9178 !important;
}

[data-theme="dark"] .monaco-editor .token.comment {
    color: #6a9955 !important;
}

[data-theme="dark"] .monaco-editor .token.number {
    color: #b5cea8 !important;
}

[data-theme="dark"] .monaco-editor .token.type {
    color: #4ec9b0 !important;
}

[data-theme="dark"] .monaco-editor .token.namespace {
    color: #4ec9b0 !important;
}

[data-theme="dark"] .monaco-editor .token.class-name {
    color: #4ec9b0 !important;
}

[data-theme="dark"] .monaco-editor .token.method {
    color: #dcdcaa !important;
}

[data-theme="dark"] .monaco-editor .token.property {
    color: #9cdcfe !important;
}

/* Responsive Design */
@media (min-width: 768px) {
    .main-content {
        grid-template-columns: 2fr 1fr;
        grid-template-rows: auto auto;
    }
    
    .editor-section {
        grid-column: 1 / 2;
        grid-row: 1 / 3;
    }
    
    .input-section {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
    }
    
    .output-section {
        grid-column: 2 / 3;
        grid-row: 2 / 3;
    }
    
    .editor-container {
        height: 500px;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 30px;
    }
    
    .editor-container {
        height: 600px;
    }
    
    .section-header {
        padding: 25px 35px;
    }
    
    .input-container,
    .output-container {
        padding: 25px 35px;
    }
}

@media (max-width: 767px) {
    .container {
        padding: 15px;
    }
    
    .header-content {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }
    
    .header-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .example-dropdown {
        min-width: 150px;
        font-size: 0.8rem;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .section-header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .section-header h2 {
        text-align: center;
    }
    
    .editor-controls,
    .input-controls,
    .output-controls {
        justify-content: center;
    }
    
    .input-container,
    .output-container {
        padding: 15px 20px;
    }
    
    .editor-container {
        height: 300px;
    }
    
    #inputArea {
        height: 120px;
    }
    
    #outputArea {
        min-height: 150px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    
    .compilation-status {
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: var(--border-radius) var(--border-radius) 0 0;
        border-bottom: none;
    }
}

@media (max-width: 480px) {
    .logo {
        gap: 10px;
    }
    
    .logo i {
        font-size: 2rem;
    }
    
    .logo h1 {
        font-size: 1.3rem;
    }
    
    .theme-btn {
        width: 40px;
        height: 40px;
    }
    
    .editor-controls,
    .input-controls,
    .output-controls {
        flex-direction: column;
    }
    
    .btn {
        justify-content: center;
        min-height: 44px;
        min-width: 44px;
    }
    
    .example-dropdown {
        min-width: 120px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Loading states */
.fa-spin {
    animation: fa-spin 2s infinite linear;
}

@keyframes fa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Focus States */
.btn:focus,
#inputArea:focus,
.example-dropdown:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(81, 43, 212, 0.2);
}

/* Enhanced button hover effects */
.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Improved accessibility */
.btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Better mobile touch targets */
@media (max-width: 767px) {
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .theme-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .example-dropdown {
        min-height: 44px;
    }
}

/* Print styles */
@media print {
    .header,
    .input-section,
    .compilation-status,
    .btn {
        display: none !important;
    }
    
    .main-content {
        grid-template-columns: 1fr !important;
    }
    
    .editor-section,
    .output-section {
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-secondary: #000000;
    }
    
    [data-theme="dark"] {
        --border-color: #ffffff;
        --text-secondary: #ffffff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .status-spinner {
        animation: none;
    }
    
    .fa-spin {
        animation: none;
    }
}

/* Custom selection colors */
::selection {
    background-color: rgba(81, 43, 212, 0.3);
    color: var(--text-primary);
}

::-moz-selection {
    background-color: rgba(81, 43, 212, 0.3);
    color: var(--text-primary);
}

/* Enhanced focus indicators for keyboard navigation */
.section-header:focus-within {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}

/* Notification Styles */
.notification {
    border-radius: 8px;
    font-family: inherit;
}

.notification i {
    flex-shrink: 0;
}

/* Enhanced notification positioning for mobile */
@media (max-width: 480px) {
    .notification {
        position: fixed !important;
        top: 10px !important;
        left: 10px !important;
        right: 10px !important;
        min-width: auto !important;
        transform: translateY(-100%) !important;
        transition: transform 0.3s ease-in-out !important;
    }
    
    .notification.show {
        transform: translateY(0) !important;
    }
}

/* Example selector enhancements */
.example-dropdown option {
    padding: 10px;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.example-dropdown:hover {
    box-shadow: 0 2px 8px rgba(81, 43, 212, 0.2);
}

/* Enhanced output message styling */
.output-success,
.error-message,
.output-info {
    position: relative;
    overflow: hidden;
}

.output-success::before,
.error-message::before,
.output-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: currentColor;
    opacity: 0.3;
}

/* Code editor enhancements */
.editor-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    z-index: 1;
}

/* Better visual hierarchy */
.section-header h2 {
    letter-spacing: -0.02em;
}

.logo h1 {
    letter-spacing: -0.03em;
}

/* Enhanced hover states */
.editor-section:hover .section-header,
.input-section:hover .section-header,
.output-section:hover .section-header {
    background: rgba(81, 43, 212, 0.05);
}

/* Loading animation for compilation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.compilation-status .status-text {
    animation: pulse 2s infinite;
}

/* Enhanced button group styling */
.editor-controls .btn:first-child,
.input-controls .btn:first-child,
.output-controls .btn:first-child {
    margin-left: 0;
}

.editor-controls .btn:last-child,
.input-controls .btn:last-child,
.output-controls .btn:last-child {
    margin-right: 0;
}

/* Improved spacing for mobile */
@media (max-width: 767px) {
    .editor-controls,
    .input-controls,
    .output-controls {
        gap: 8px;
    }
}

/* Enhanced Monaco Editor integration */
.monaco-editor {
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.monaco-editor .margin {
    background-color: var(--bg-tertiary) !important;
}

.monaco-editor .monaco-editor-background {
    background-color: var(--bg-secondary) !important;
}

/* C# syntax highlighting improvements */
.monaco-editor .token.using {
    color: #c586c0 !important;
    font-weight: bold;
}

.monaco-editor .token.static {
    color: #569cd6 !important;
    font-weight: bold;
}

.monaco-editor .token.public,
.monaco-editor .token.private,
.monaco-editor .token.protected,
.monaco-editor .token.internal {
    color: #569cd6 !important;
    font-weight: bold;
}

.monaco-editor .token.void,
.monaco-editor .token.int,
.monaco-editor .token.string,
.monaco-editor .token.bool,
.monaco-editor .token.double,
.monaco-editor .token.float,
.monaco-editor .token.long,
.monaco-editor .token.char {
    color: #569cd6 !important;
}

.monaco-editor .token.var {
    color: #569cd6 !important;
    font-style: italic;
}

.monaco-editor .token.async,
.monaco-editor .token.await {
    color: #c586c0 !important;
    font-weight: bold;
}

/* Dark theme C# syntax adjustments */
[data-theme="dark"] .monaco-editor .token.using {
    color: #c586c0 !important;
}

[data-theme="dark"] .monaco-editor .token.static {
    color: #569cd6 !important;
}

[data-theme="dark"] .monaco-editor .token.public,
[data-theme="dark"] .monaco-editor .token.private,
[data-theme="dark"] .monaco-editor .token.protected,
[data-theme="dark"] .monaco-editor .token.internal {
    color: #569cd6 !important;
}

[data-theme="dark"] .monaco-editor .token.void,
[data-theme="dark"] .monaco-editor .token.int,
[data-theme="dark"] .monaco-editor .token.string,
[data-theme="dark"] .monaco-editor .token.bool,
[data-theme="dark"] .monaco-editor .token.double,
[data-theme="dark"] .monaco-editor .token.float,
[data-theme="dark"] .monaco-editor .token.long,
[data-theme="dark"] .monaco-editor .token.char {
    color: #569cd6 !important;
}

[data-theme="dark"] .monaco-editor .token.var {
    color: #569cd6 !important;
}

[data-theme="dark"] .monaco-editor .token.async,
[data-theme="dark"] .monaco-editor .token.await {
    color: #c586c0 !important;
}

/* Enhanced error message formatting */
.error-message code,
.output-success code,
.output-info code {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.85em;
}

[data-theme="dark"] .error-message code,
[data-theme="dark"] .output-success code,
[data-theme="dark"] .output-info code {
    background: rgba(255, 255, 255, 0.1);
}

/* Improved button spacing in controls */
.editor-controls > *,
.input-controls > *,
.output-controls > * {
    flex-shrink: 0;
}

/* Enhanced compilation status for different screen sizes */
@media (max-width: 768px) {
    .compilation-status {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }
}

/* Better focus management */
.btn:focus,
.example-dropdown:focus,
#inputArea:focus {
    z-index: 10;
    position: relative;
}

/* Enhanced theme transition */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Improved mobile layout */
@media (max-width: 480px) {
    .header-content {
        align-items: stretch;
    }
    
    .header-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .example-dropdown {
        width: 100%;
    }
}

/* C# specific styling enhancements */
.csharp-feature {
    background: linear-gradient(135deg, rgba(81, 43, 212, 0.1), rgba(60, 30, 158, 0.1));
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    margin: 10px 0;
    border-radius: 8px;
}

.csharp-feature h3 {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

/* Enhanced Monaco Editor C# specific features */
.monaco-editor .suggest-widget {
    background: var(--bg-primary) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-hover) !important;
}

.monaco-editor .suggest-widget .monaco-list .monaco-list-row {
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

.monaco-editor .suggest-widget .monaco-list .monaco-list-row:hover {
    background: var(--bg-tertiary) !important;
}

.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused {
    background: var(--primary-color) !important;
    color: white !important;
}

/* C# documentation tooltips */
.monaco-editor .parameter-hints-widget {
    background: var(--bg-primary) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-hover) !important;
    color: var(--text-primary) !important;
}

/* Enhanced scrollbar for Monaco Editor */
.monaco-editor .monaco-scrollable-element > .scrollbar > .slider {
    background: var(--border-color) !important;
}

.monaco-editor .monaco-scrollable-element > .scrollbar > .slider:hover {
    background: var(--text-secondary) !important;
}

/* C# specific output formatting */
.output-csharp {
    font-family: 'Consolas', 'Courier New', monospace;
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    border-left: 4px solid var(--primary-color);
}

.output-csharp .line-number {
    color: var(--text-secondary);
    margin-right: 10px;
    user-select: none;
}

/* Enhanced loading states */
.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60% { content: '...'; }
    80%, 100% { content: ''; }
}

/* Improved accessibility for screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Enhanced focus indicators */
.btn:focus-visible,
.example-dropdown:focus-visible,
#inputArea:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(81, 43, 212, 0.2);
}

/* Better contrast for dark mode */
[data-theme="dark"] .output-success {
    background: rgba(52, 199, 89, 0.2);
}

[data-theme="dark"] .error-message {
    background: rgba(255, 59, 48, 0.2);
}

[data-theme="dark"] .output-info {
    background: rgba(0, 122, 255, 0.2);
}

/* Enhanced mobile experience */
@media (max-width: 480px) {
    .status-content {
        font-size: 0.8rem;
    }
    
    .status-spinner {
        width: 16px;
        height: 16px;
    }
    
    .notification {
        font-size: 0.9rem;
        padding: 12px 16px;
    }
}

/* Performance optimizations */
.monaco-editor {
    contain: layout style paint;
}

.compilation-status {
    will-change: transform, opacity;
}

.notification {
    will-change: transform;
}

/* Enhanced visual feedback */
.btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.theme-btn:active {
    transform: scale(0.95);
}

/* Better error state styling */
.input-error {
    border-color: var(--danger-color) !important;
    box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.1) !important;
}

.editor-error {
    border-left: 4px solid var(--danger-color);
}

/* Success state styling */
.input-success {
    border-color: var(--success-color) !important;
    box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.1) !important;
}

.editor-success {
    border-left: 4px solid var(--success-color);
}