:root {
    /* Global subtle rounding for the whole UI */
    --ui-radius: 6px;
    --ui-radius-sm: 4px;
}

/* Global subtle rounding for controls */
:where(
  button,
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
  select,
  textarea
) {
    border-radius: var(--ui-radius);
}

.logs-panel {
    height: 20%;
    min-height: 100px;
    max-height: 70%;
    display: flex;
    flex-direction: column;
    background: #1a1a1a;
    flex-shrink: 0;
}

.logs-header {
    padding: 0.5rem 1rem;
    background: #1a1a1a;
    border-bottom: 1px solid #333333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.logs-header h3 {
    font-size: 0.75rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.logs-container {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    background: #1a1a1a;
    font-family: 'Courier New', monospace;
    font-size: 0.8125rem;
    color: #ffffff;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: var(--ui-radius);
    width: 90%;
    max-width: 28rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #333333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1a1a1a;
}

.modal-header h3 {
    color: #ffffff;
    font-size: 1.125rem;
    font-weight: 600;
}

.modal-close {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.modal-close:hover {
    color: #cccccc;
}

.modal-body {
    padding: 1.5rem;
    background: #1a1a1a;
}

.modal-body label {
    display: block;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.modal-input {
    width: 100%;
    padding: 0.625rem;
    background: #2a2a2a;
    border: 1px solid #333333;
    border-radius: var(--ui-radius);
    font-size: 0.875rem;
    color: #ffffff;
    outline: none;
    transition: border-color 0.2s;
}

.modal-input:focus {
    border-color: #555555;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #333333;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background: #1a1a1a;
}

::-webkit-scrollbar {
    width: 0.5rem;
    height: 0.5rem;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0.25rem;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) rgba(15, 23, 42, 0.5);
}

.CodeMirror {
    height: 100% !important;
    font-family: 'Fira Code', 'Courier New', monospace !important;
    font-size: 0.875rem !important;
    line-height: 1.6 !important;
    background: transparent !important;
}

.CodeMirror-gutters {
    background: #1a1a1a !important;
    border-right: 1px solid #333333 !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    min-width: 50px !important;
}

.CodeMirror-gutter.CodeMirror-linenumbers {
    background: #1a1a1a !important;
    width: 50px !important;
    min-width: 50px !important;
    text-align: right !important;
}

.CodeMirror-linenumber {
    color: #888888 !important;
    padding: 0 0.75rem 0 0 !important;
    text-align: right !important;
    display: block !important;
    min-width: 30px !important;
}

.CodeMirror-gutter.CodeMirror-lint-markers {
    display: none !important;
    width: 0 !important;
}

.CodeMirror-cursor {
    border-left: 2px solid #555555 !important;
}

.CodeMirror-selected {
    background: rgba(85, 85, 85, 0.2) !important;
}

.cm-s-dracula.CodeMirror {
    background: #2a2a2a !important;
    color: #ffffff !important;
}


.cm-s-dracula .cm-keyword-red {
    color: #ff6188 !important;
    font-weight: bold !important;
}

.cm-s-dracula .cm-keyword-purple {
    color: #ab9df2 !important;
    font-weight: 600 !important;
}

.cm-s-dracula .cm-keyword-blue {
    color: #78dce8 !important;
    font-weight: bold !important;
}

.cm-s-dracula .cm-keyword-pink {
    color: #ff6188 !important;
    font-weight: bold !important;
}

.cm-s-dracula .cm-type-cyan {
    color: #78dce8 !important;
    font-weight: 600 !important;
}

.cm-s-dracula .cm-builtin-yellow {
    color: #ffd866 !important;
    font-weight: 600 !important;
}

.cm-s-dracula .cm-atom-orange {
    color: #fc9867 !important;
    font-weight: bold !important;
}

.cm-s-dracula .cm-def-green {
    color: #a9dc76 !important;
    font-weight: 600 !important;
}

.cm-s-dracula .cm-function-yellow {
    color: #ffd866 !important;
    font-weight: 600 !important;
}

.cm-s-dracula .cm-variable-white {
    color: #fcfcfa !important;
}

.cm-s-dracula .cm-bracket-yellow {
    color: #ffd866 !important;
    font-weight: bold !important;
}

.cm-s-dracula .cm-operator-white {
    color: #fcfcfa !important;
}

.cm-s-dracula .cm-punctuation-gray {
    color: #939293 !important;
}

.cm-s-dracula .cm-string {
    color: #ffd866 !important;
}

.cm-s-dracula .cm-number {
    color: #fc9867 !important;
    font-weight: 500 !important;
}

.cm-s-dracula .cm-comment {
    color: #727072 !important;
    font-style: italic !important;
}

.cm-s-dracula .cm-keyword {
    color: #78dce8 !important;
    font-weight: bold !important;
}

.cm-s-dracula .cm-builtin {
    color: #ffd866 !important;
    font-weight: 600 !important;
}

.cm-s-dracula .cm-variable {
    color: #fcfcfa !important;
}

.cm-s-dracula .cm-variable-2 {
    color: #78dce8 !important;
    font-weight: 600 !important;
}

.cm-s-dracula .cm-bracket {
    color: #ffd866 !important;
    font-weight: bold !important;
}

.cm-s-dracula .cm-operator {
    color: #fcfcfa !important;
}

.cm-s-dracula .cm-punctuation {
    color: #939293 !important;
}

.cm-s-dracula .cm-keyword.cm-js-keyword {
    color: #c678dd !important;
    font-weight: bold !important;
}

.cm-s-dracula .cm-builtin.cm-js-builtin {
    color: #e5c07b !important;
    font-weight: 600 !important;
}

.cm-s-dracula .cm-variable.cm-js-variable {
    color: #61afef !important;
}

.cm-s-dracula .cm-property {
    color: #56b6c2 !important;
}

.cm-s-dracula .cm-def {
    color: #98c379 !important;
    font-weight: 600 !important;
}

.cm-s-dracula .cm-variable-2.cm-js-this {
    color: #e06c75 !important;
    font-weight: bold !important;
}

.cm-s-dracula .cm-string.cm-js-string {
    color: #98c379 !important;
}

.cm-s-dracula .cm-number.cm-js-number {
    color: #d19a66 !important;
}

.cm-s-dracula .cm-atom {
    color: #d19a66 !important;
    font-weight: bold !important;
}

.cm-s-dracula .cm-comment.cm-js-comment {
    color: #5c6370 !important;
    font-style: italic !important;
}

.cm-s-dracula .CodeMirror-activeline-background {
    background: rgba(85, 85, 85, 0.05) !important;
}

.cm-s-dracula .CodeMirror-matchingbracket {
    color: #ffd700 !important;
    background: rgba(255, 215, 0, 0.2) !important;
    border: 1px solid #ffd700 !important;
}

.CodeMirror-hints {
    background: #1a1a1a !important;
    border: 1px solid #333333 !important;
    border-radius: var(--ui-radius) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
    font-family: 'Fira Code', 'Courier New', monospace !important;
    font-size: 0.875rem !important;
    max-height: 20rem !important;
    overflow-y: auto !important;
}

.CodeMirror-hint {
    color: #94a3b8 !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: var(--ui-radius-sm) !important;
    cursor: pointer !important;
}

.CodeMirror-hint-active {
    background: rgba(85, 85, 85, 0.2) !important;
    color: #555555 !important;
}



.CodeMirror-lint-marker-error {
    display: none !important;
}

.CodeMirror-lint-marker-error::after {
    display: none !important;
}

.CodeMirror-lint-marker-warning {
    display: none !important;
}

.CodeMirror-lint-marker-warning::after {
    display: none !important;
}

.CodeMirror-lint-tooltip {
    background: #1a1a1a !important;
    border: 1px solid #333333 !important;
    border-radius: var(--ui-radius) !important;
    color: #ffffff !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 0.8125rem !important;
    padding: 0.75rem 1rem !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5) !important;
    max-width: 400px !important;
}

.CodeMirror-lint-mark-error {
    background: none !important;
    border-bottom: 2px solid #ef4444 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3E%3Cpath stroke='%23ef4444' stroke-width='1' d='M0 3L2 1 4 3'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-position: bottom;
    background-size: 4px 4px;
}

.CodeMirror-lint-mark-warning {
    background: none !important;
    background-image: none !important;
    text-decoration: none !important;
    border-bottom: 3px wavy #fbbf24 !important;
    padding-bottom: 2px !important;
}

.CodeMirror-errorline {
    background: rgba(239, 68, 68, 0.1) !important;
    border-left: 3px solid #ef4444 !important;
}

.CodeMirror-warningline {
    background: rgba(251, 191, 36, 0.1) !important;
    border-left: 3px solid #fbbf24 !important;
}

.drag-over-folder {
    background: rgba(85, 85, 85, 0.2) !important;
    border: 1px solid rgba(85, 85, 85, 0.5);
    border-radius: 0.25rem;
}

@keyframes copySuccess {
    0% {
        background: rgba(74, 222, 128, 0.3);
    }
    100% {
        background: transparent;
    }
}

.copy-btn.copied {
    animation: copySuccess 0.5s ease-out;
}

@media (max-width: 1440px) {
    .sidebar-panel {
        width: 16rem;
    }
}

@media (max-width: 1024px) {
    .sidebar-panel {
        width: 14rem;
    }
    
    .vertical-tabs {
        width: 3rem;
    }
}

/* Responsive Styles for Header and Footer */
@media (max-width: 1024px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .header-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .site-header {
        padding: 0.75rem 1rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .brand-title {
        font-size: 1.25rem;
    }
    
    .brand-logo {
        height: 2rem;
    }
    
    .brand-subtitle {
        font-size: 0.75rem;
    }
    
    .header-nav {
        gap: 0.75rem;
    }
    
    .nav-link {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }
    
    .site-footer {
        padding: 1rem 1rem 0.75rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .ide-interface {
        height: calc(100vh - 120px);
        min-height: 500px;
    }
    
    .main-container {
        padding: 1rem 0.75rem 0.75rem;
    }
    
    .ide-header {
        padding: 0 1rem;
    }
    
    .logo {
        font-size: 1rem;
    }
    
    .ide-logo {
        height: 1.5rem;
    }
    
    .sidebar-panel {
        width: 12rem;
    }
    
    .vertical-tabs {
        width: 2.5rem;
    }
    
    .vertical-tab {
        height: 2.5rem;
    }
    
    .vertical-tab svg {
        width: 1.25rem;
        height: 1.25rem;
    }
    
    .wallet-section-header {
        gap: 0.5rem;
    }
    
    .wallet-connect-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .wallet-info-header {
        padding: 0.375rem 0.75rem;
        gap: 0.5rem;
    }
}

w3m-modal {
    /* Keep WalletConnect modal above any IDE popovers/menus */
    --w3m-z-index: 200000;
}

w3m-modal::part(modal) {
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(85, 85, 85, 0.3);
    border-radius: 0.5rem;
}

w3m-modal::part(overlay) {
    background: rgba(0, 0, 0, 0.75);
}

.file-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
} 

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

/* Screen reader only - for SEO h1 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    width: 100vw;
    overflow-x: hidden;
    overflow-y: auto;
    background: #222222;
    color: #e0e0e0;
    display: flex;
    flex-direction: column;
}

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

.background-gradient {
    width: 100%;
    height: 100%;
    background: #222222;
}

.background-grid {
    display: none;
}

/* Site Header Styles */
.site-header {
    position: relative;
    z-index: 100;
    background: #1a1a1a;
    border-bottom: 1px solid #333333;
    padding: 0.5rem 2rem;
}

.header-content {
    max-width: 1920px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-info {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.brand-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
}

.brand-logo-link {
    display: inline-block;
    text-decoration: none;
    line-height: 0;
}

.brand-logo {
    height: 2.5rem;
    width: auto;
    object-fit: contain;
    display: block;
}

.header-nav {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Site Footer Styles */
.site-footer {
    position: relative;
    z-index: 100;
    background: #1a1a1a;
    border-top: 1px solid #333333;
    padding: 1.5rem 2rem 1rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1920px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #333333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links li {
    margin: 0;
}

.footer-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: #cccccc;
}

.footer-glossary {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-glossary li {
    color: #ffffff;
    font-size: 0.8125rem;
    line-height: 1.5;
    padding: 0;
    margin: 0;
}

.footer-glossary strong {
    color: #ffffff;
    font-weight: 600;
    margin-right: 0.5rem;
}

.footer-about-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-about-title {
    color: #ffffff;
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
}

.footer-about-version {
    color: #94a3b8;
    font-size: 0.875rem;
    margin: 0;
}

.footer-about-description {
    color: #cccccc;
    font-size: 0.8125rem;
    line-height: 1.6;
    margin: 0;
}

.footer-about-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.footer-feature-tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: rgba(42, 42, 42, 0.6);
    border: 1px solid #333333;
    border-radius: var(--ui-radius-sm);
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 500;
}

.footer-about-footer {
    color: #64748b;
    font-size: 0.8125rem;
    margin-top: 0.5rem;
    font-style: italic;
}

.footer-privacy-info {
    margin-top: 0.75rem;
    padding: 0;
}

.footer-privacy-info p {
    color: #ffffff;
    font-size: 0.8125rem;
    line-height: 1.5;
    margin: 0 0 0.5rem 0;
}

.footer-privacy-info p:last-child {
    margin-bottom: 0;
}

.footer-warning {
    color: #fbbf24 !important;
    font-weight: 500;
}

.privacy-link {
    color: #ffffff !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.privacy-link:hover {
    color: #cccccc !important;
}

.footer-bottom {
    max-width: 1920px;
    margin: 0 auto;
    padding-top: 1rem;
    border-top: 1px solid #333333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8125rem;
    margin: 0;
}

.footer-version {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8125rem;
    font-weight: 500;
}

.main-container {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex: 1;
    padding: 1.5rem 1rem 1rem;
    margin-top: 0;
    min-height: calc(100vh - 60px);
    padding-bottom: 2rem;
}

.ide-interface {
    width: 100%;
    max-width: 1920px;
    height: calc(100vh - 120px);
    min-height: 600px;
    background: #1a1a1a;
    border-radius: var(--ui-radius);
    box-shadow: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #333333;
    margin: 0.25rem;
}

.ide-header {
    height: 3.5rem;
    background: #1a1a1a;
    border-bottom: 1px solid #333333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
}

.ide-logo {
    height: 2rem;
    width: auto;
    object-fit: contain;
    display: block;
    background: transparent;
    mix-blend-mode: normal;
}

.logo-caption {
    font-size: 0.9rem;
    font-weight: 300;
    color: #4da3ff;
    letter-spacing: 0.2px;
    line-height: 1;
    white-space: nowrap;
    min-width: 0;
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.version {
    font-size: 0.75rem;
    color: #cccccc;
    background: #2a2a2a;
    padding: 0.25rem 0.5rem;
    border-radius: var(--ui-radius-sm);
    border: 1px solid #333333;
}

.wallet-section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.wallet-connect-btn {
    padding: 0.5rem 1rem;
    background: #2a2a2a;
    color: #ffffff;
    border: 1px solid #333333;
    border-radius: var(--ui-radius);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wallet-connect-btn:hover {
    background: #333333;
}

.wallet-connect-btn svg {
    width: 1rem;
    height: 1rem;
}

.wallet-info-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(30, 41, 59, 0.6);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    border: 1px solid rgba(71, 85, 105, 0.4);
}

.wallet-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
    animation: pulse-dot 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.wallet-details {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.wallet-address-short {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: #ffffff;
    font-weight: 500;
}

.wallet-balance-short {
    font-size: 0.7rem;
    font-weight: 600;
    color: #ffffff;
}

.wallet-disconnect-btn {
    width: 2rem;
    height: 2rem;
    padding: 0.375rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 0.375rem;
    color: #f87171;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wallet-disconnect-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-1px);
}

.wallet-disconnect-btn svg {
    width: 1rem;
    height: 1rem;
}

.ide-body {
    flex: 1;
    display: flex;
    overflow: hidden;
    gap: 0.25rem;
    padding: 0.25rem;
}

.vertical-tabs {
    width: 3.5rem;
    background: #1a1a1a;
    border-right: 1px solid #333333;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 0.25rem;
    margin-right: 0.25rem;
}

.vertical-tab {
    width: 100%;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    color: #64748b;
    position: relative;
    background: transparent;
}

.vertical-tab:hover {
    background: rgba(30, 41, 59, 0.6);
    color: #94a3b8;
}

.vertical-tab.active {
    background: #2a2a2a;
    color: #ffffff;
    border: 1px solid #333333;
}

.vertical-tab svg {
    width: 1.5rem;
    height: 1.5rem;
}

.sidebar-panel {
    width: 18rem;
    background: #1a1a1a;
    border-right: 1px solid #333333;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-right: 0.25rem;
}

.panel-content {
    display: none;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    padding: 0.25rem;
}

.panel-content.active {
    display: flex;
}

.panel-header {
    padding: 0.75rem 1rem;
    background: #1a1a1a;
    border-bottom: 1px solid #333333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.panel-header h3 {
    font-size: 0.75rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.clear-logs-btn {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.clear-logs-btn:hover {
    background: rgba(239, 68, 68, 0.3);
}

.panel-toolbar {
    padding: 0.5rem;
    background: #1a1a1a;
    border-bottom: 1px solid #333333;
    display: flex;
    gap: 0.5rem;
}

.toolbar-btn {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2a2a2a;
    border: 1px solid #333333;
    border-radius: var(--ui-radius);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
}

.toolbar-btn:hover {
    background: #333333;
}

.toolbar-btn svg {
    width: 1rem;
    height: 1rem;
}

.panel-body {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.25rem;
}


.file-tree {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.file-item, .folder-item {
    padding: 0.5rem;
    margin-bottom: 0.25rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    position: relative;
    background: rgba(255, 255, 255, 0.02);
}

.file-item:hover, .folder-item:hover {
    background: rgba(255, 255, 255, 0.05);
}



.file-item svg, .folder-item svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.folder-container {
    margin-bottom: 0.25rem;
}

.folder-item {
    color: #fbbf24;
    background: rgba(255, 255, 255, 0.02);
}

.folder-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.folder-icon {
    transition: transform 0.2s ease;
}

.folder-children {
    margin-top: 0.25rem;
    padding-left: 1rem;
    border-left: 2px solid rgba(251, 191, 36, 0.3);
    background: rgba(251, 191, 36, 0.03);
    border-radius: 0 0.25rem 0.25rem 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease, margin 0.3s ease;
}

.folder-container.expanded .folder-children {
    max-height: 2000px;
}

.folder-container:not(.expanded) .folder-children {
    padding: 0;
    margin: 0;
}

.context-menu {
    position: fixed;
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    padding: 0.25rem;
    min-width: 180px;
    z-index: 10000;
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--ui-radius-sm);
    cursor: pointer;
    transition: background 0.2s;
    color: #ffffff;
    font-size: 0.875rem;
}

.context-menu-item svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    stroke: currentColor;
}

.context-menu-item:hover {
    background: #2a2a2a;
    color: #ffffff;
}

.context-menu-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.context-menu-divider {
    height: 1px;
    background: #333333;
    margin: 0.25rem 0;
}

.context-menu-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: #2a2a2a;
    border: 1px solid #333333;
    border-radius: var(--ui-radius);
    color: #ffffff;
    font-size: 0.875rem;
    font-family: 'Segoe UI', sans-serif;
    outline: none;
    transition: border-color 0.2s;
}

.context-menu-input:focus {
    border-color: #555555;
    background: #2a2a2a;
}

.context-menu-input::placeholder {
    color: #64748b;
}

.delete-btn {
    opacity: 0;
    margin-left: auto;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.file-item:hover .delete-btn,
.folder-item:hover .delete-btn {
    opacity: 1;
}

.delete-btn:hover {
    background: rgba(239, 68, 68, 0.4);
}

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.settings-group label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #ffffff;
}

.select-input, .input-field {
    width: 100%;
    padding: 0.5rem;
    background: #2a2a2a;
    border: 1px solid #333333;
    border-radius: var(--ui-radius);
    font-size: 0.875rem;
    color: #ffffff;
    outline: none;
    transition: border-color 0.2s;
}

/* Remix-like Environment dropdown with right-side hover submenus */
.env-dropdown {
    position: relative;
}

.env-dropdown-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    border-radius: var(--ui-radius);
}

.env-caret {
    color: #ffffffb3;
    font-size: 0.8rem;
    line-height: 1;
    flex-shrink: 0;
}

.env-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: var(--ui-radius);
    /* Must be above editor area */
    z-index: 150000;
    display: flex;
    flex-direction: column;
    padding: 0.25rem;
}

.env-menu.hidden {
    display: none;
}

.env-menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.6rem;
    color: #ffffff;
    background: transparent;
    border: none;
    text-align: left;
    cursor: default;
    font-size: 0.875rem;
}

.env-menu-click {
    cursor: pointer;
}

.env-menu-item:hover {
    background: #2a2a2a;
}

.env-menu-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.env-submenu-arrow {
    flex-shrink: 0;
    color: #ffffffb3;
}

.env-menu-item.has-submenu {
    position: relative;
}

/* Hover bridge: keep :hover active while moving mouse from the row to the right-side submenu */
.env-menu-item.has-submenu::after {
    content: '';
    position: absolute;
    top: 0;
    right: -10px;  /* covers the gap to the submenu */
    width: 10px;
    height: 100%;
    background: transparent;
}

.env-submenu {
    position: absolute;
    top: -0.25rem;
    /* Smaller gap; remaining space is covered by the hover bridge above */
    left: calc(100% + 2px);
    min-width: 220px;
    max-height: 340px;
    overflow: auto;
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: var(--ui-radius);
    padding: 0.25rem;
    display: none;
    z-index: 150001;
}

.env-menu-item.has-submenu:hover > .env-submenu {
    display: flex;
    flex-direction: column;
}

/* Touch/Click fallback: open right-side submenu when the parent row is clicked */
.env-menu-item.has-submenu.submenu-open > .env-submenu {
    display: flex;
    flex-direction: column;
}

.env-submenu-item {
    width: 100%;
    border: none;
    background: transparent;
    color: #ffffff;
    text-align: left;
    padding: 0.5rem 0.6rem;
    cursor: pointer;
    font-size: 0.875rem;
}

.env-submenu-item:hover {
    background: #2a2a2a;
}

.env-submenu-sep {
    height: 1px;
    background: #333333;
    margin: 0.25rem 0;
}

.env-submenu-empty {
    padding: 0.5rem 0.6rem;
    color: #94a3b8;
    font-size: 0.8125rem;
}

.select-input:focus, .input-field:focus {
    border-color: #555555;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    color: #ffffff;
}

.checkbox-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
    accent-color: #555555;
}

.btn-primary, .btn-secondary {
    padding: 0.625rem 1rem;
    border: 1px solid #333333;
    border-radius: var(--ui-radius);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

/* Header buttons (Resources/Templates) */
.header-menu-btn {
    border-radius: var(--ui-radius);
}

.btn-primary {
    background: #2a2a2a;
    color: #ffffff;
    border: 1px solid #333333;
}

.btn-primary:hover:not(:disabled) {
    background: #333333;
}

/* Compile button (Remix-like blue) */
#compileBtn.btn-primary {
    background: #64c4ff;
    border-color: #64c4ff;
    color: #0b0f14;
    font-weight: 400;
}

#compileBtn.btn-primary:hover:not(:disabled) {
    background: #41b6ff;
    border-color: #41b6ff;
}

/* Make compile icon black on the blue button */
#compileBtn .compile-icon {
    filter: brightness(0) invert(0);
}

/* Deploy button (warm orange) */
#deployBtn.btn-primary {
    background: #c97539;
    border-color: #c97539;
    color: #ffffff;
    font-weight: 400;
}

#deployBtn.btn-primary:hover:not(:disabled) {
    background: #b86833;
    border-color: #b86833;
    color: #ffffff;
}

.btn-primary:disabled {
    background: #1a1a1a;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-secondary {
    background: #2a2a2a;
    color: #ffffff;
    border: 1px solid #333333;
}

.btn-secondary:hover {
    background: #333333;
}

.btn-full {
    width: 100%;
}

.btn-primary .icon, .btn-secondary .icon {
    width: 1rem;
    height: 1rem;
}

.compile-icon {
    width: 1rem;
    height: 1rem;
    object-fit: contain;
    filter: brightness(0) invert(1);
    vertical-align: middle;
}

.compile-icon-spinning {
    animation: spin 1s linear infinite;
}

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

.hidden {
    display: none !important;
}

.compilation-result {
    margin-top: 1rem;
}

.compiled-box {
    margin-top: 1rem;
}

.compiled-data {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.compilation-success {
    background: rgba(74, 222, 128, 0.1);
    border-radius: 0.375rem;
    overflow: hidden;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.success-header {
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
    border-bottom: 1px solid rgba(74, 222, 128, 0.3);
}

.success-header svg {
    width: 1.25rem;
    height: 1.25rem;
}

.compilation-errors {
    background: rgba(239, 68, 68, 0.1);
    border-radius: 0.375rem;
    overflow: hidden;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.error-header {
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border-bottom: 1px solid rgba(239, 68, 68, 0.3);
}

.error-header svg {
    width: 1.25rem;
    height: 1.25rem;
}

.error-list {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.error-item {
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    align-items: flex-start;
}



.error-item.warning {
    border-left: 3px solid #fbbf24;
}

.error-type-badge {
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.error-item.error .error-type-badge {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.error-item.warning .error-type-badge {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.error-message {
    color: #94a3b8;
    line-height: 1.5;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
}

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

.animate-spin {
    animation: spin 1s linear infinite;
}

.compiled-data {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.compiled-data-item {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 0.25rem;
    padding: 0.75rem;
    border: 1px solid rgba(71, 85, 105, 0.3);
}

.compiled-data-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.compiled-data-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #555555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.copy-data-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.625rem;
    background: rgba(85, 85, 85, 0.1);
    border: 1px solid rgba(85, 85, 85, 0.2);
    border-radius: 0.25rem;
    color: #555555;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-data-btn:hover {
    background: rgba(85, 85, 85, 0.2);
}

.copy-data-btn svg {
    width: 0.875rem;
    height: 0.875rem;
}

.compiled-code-preview {
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
    color: #94a3b8;
    background: rgba(15, 23, 42, 0.8);
    padding: 0.5rem;
    border-radius: 0.25rem;
    overflow-x: auto;
    white-space: nowrap;
}

.contracts-section {
    margin-top: 1rem;
}

.section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 0.75rem;
}

.contract-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contract-item {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
    border: 1px solid rgba(85, 85, 85, 0.3);
    border-radius: 0.5rem;
    padding: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    animation: slideInFromTop 0.3s ease-out;
}

.contract-item:hover {
    border-color: rgba(85, 85, 85, 0.5);
    box-shadow: 0 4px 16px rgba(85, 85, 85, 0.2);
    transform: translateY(-2px);
}

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

.contract-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(71, 85, 105, 0.3);
}

.contract-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contract-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #555555;
}

.contract-name {
    font-size: 1rem;
    font-weight: 600;
    color: #e0e0e0;
    font-family: 'Courier New', monospace;
}

.contract-env-badge {
    font-size: 0.625rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.env-vm {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(168, 85, 247, 0.3) 100%);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.4);
}

.env-injected {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(74, 222, 128, 0.3) 100%);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.contract-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.contract-detail-row {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.detail-label {
    font-size: 0.625rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 0.375rem;
    border: 1px solid rgba(71, 85, 105, 0.3);
}

.detail-value code {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: #555555;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.copy-btn {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn:hover {
    background: rgba(85, 85, 85, 0.2);
    color: #555555;
}

.copy-btn svg {
    width: 1rem;
    height: 1rem;
}

.editor-tab {
    padding: 0.75rem 1.25rem;
    background: transparent;
    color: #94a3b8;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    border-right: 1px solid rgba(85, 85, 85, 0.1);
    transition: all 0.2s;
    white-space: nowrap;
    user-select: none;
    position: relative;
}

.editor-tab.active {
    background: #1a1a1a;
    border-bottom: 2px solid #555555;
}

.editor-tab:hover:not(.active) {
    background: rgba(85, 85, 85, 0.05);
}

.editor-tab.dragging {
    opacity: 0.5;
}

.editor-tab.drag-over {
    border-left: 2px solid #555555;
}

.editor-tab svg {
    width: 1rem;
    height: 1rem;
}

.editor-tab .close-tab {
    margin-left: 0.5rem;
    opacity: 0;
    color: #94a3b8;
    font-size: 1.125rem;
    line-height: 1;
    transition: opacity 0.2s;
}

.editor-tab:hover .close-tab {
    opacity: 1;
}

.editor-tab .close-tab:hover {
    color: #f87171;
}

.log-entry {
    display: flex;
    gap: 0.75rem;
    padding: 0.5rem;
    margin-bottom: 0.25rem;
    border-radius: 0.25rem;
    transition: background 0.2s;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.log-entry:hover {
    background: rgba(85, 85, 85, 0.05);
}

.log-message {
    color: #94a3b8;
}

.log-info .log-message {
    color: #ffffff;
}

.log-success .log-message {
    color: #ffffff;
}

.log-error .log-message {
    color: #ffffff;
}

.log-warning .log-message {
    color: #ffffff;
}

.log-welcome {
    padding: 0.75rem;
    color: #94a3b8;
    font-size: 0.75rem;
    line-height: 1.5;
}

.log-welcome-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #555555;
    margin-bottom: 0.5rem;
}

.log-welcome-text {
    color: #94a3b8;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
}

.log-welcome-section {
    margin-bottom: 0.75rem;
}

.log-welcome-subtitle {
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 0.375rem;
    font-size: 0.75rem;
}

.log-welcome-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.log-welcome-list li {
    padding: 0.25rem 0;
    padding-left: 1rem;
    position: relative;
    color: #94a3b8;
    font-size: 0.7rem;
}

.log-welcome-list li:before {
    content: "•";
    position: absolute;
    left: 0.25rem;
    color: #555555;
    font-weight: bold;
}

.log-highlight {
    color: #ffffff;
    font-weight: 500;
}

.log-welcome-footer {
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(71, 85, 105, 0.3);
    color: #94a3b8;
    font-style: italic;
    font-size: 0.7rem;
}

.editor-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #1a1a1a;
    overflow: hidden;
    margin-left: 0.25rem;
}

.editor-tabs {
    background: #1a1a1a;
    border-bottom: 1px solid #333333;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    flex-shrink: 0;
}

.editor-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #2a2a2a;
    min-height: 200px;
}

.resizer {
    height: 8px;
    background: rgba(30, 41, 59, 0.9);
    border-top: 1px solid rgba(71, 85, 105, 0.4);
    border-bottom: 1px solid rgba(71, 85, 105, 0.4);
    cursor: ns-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    transition: background 0.2s;
    flex-shrink: 0;
}

.resizer:hover {
    background: rgba(85, 85, 85, 0.25);
}

.resizer-handle {
    width: 80px;
    height: 3px;
    background: rgba(100, 116, 139, 0.6);
    border-radius: 3px;
    transition: all 0.2s;
}

.resizer:hover .resizer-handle {
    background: rgba(85, 85, 85, 0.7);
    width: 100px;
}

.resizer.dragging {
    background: rgba(85, 85, 85, 0.35);
}

.resizer.dragging .resizer-handle {
    background: rgba(85, 85, 85, 0.9);
    width: 100px;
}

.compiler-info {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(85, 85, 85, 0.05);
    border-radius: 0.25rem;
    border: 1px solid rgba(85, 85, 85, 0.1);
}

.compiler-info small {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.select-input optgroup {
    background: #1a1a1a;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.5rem 0.25rem;
}

.select-input option {
    background: #2a2a2a;
    color: #ffffff;
    padding: 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.8125rem;
}

.select-input option:hover {
    background: #333333;
}

.settings-group + .settings-group {
    margin-top: 1rem;
}



.compiled-links-row {
    display: flex;
    gap: 1.5rem;
    padding: 0.75rem;
    justify-content: center;
    align-items: center;
}

.compiled-link-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.compiled-link-item:hover {
    background: rgba(85, 85, 85, 0.1);
}

.compiled-link-text {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: #555555;
    font-weight: 500;
    transition: color 0.2s;
}

.compiled-link-item:hover .compiled-link-text {
    color: #93c5fd;
}

.compiled-link-icon {
    width: 0.875rem;
    height: 0.875rem;
    color: #555555;
    transition: color 0.2s;
    flex-shrink: 0;
}

.compiled-link-item:hover .compiled-link-icon {
    color: #93c5fd;
}

.compiled-link-item.copied {
    background: rgba(74, 222, 128, 0.15);
}

.compiled-link-item.copied .compiled-link-text,
.compiled-link-item.copied .compiled-link-icon {
    color: #4ade80;
}

@keyframes copyFlash {
    0% {
        background: rgba(74, 222, 128, 0.25);
    }
    100% {
        background: transparent;
    }
}

.compiled-link-item.copied {
    animation: copyFlash 1s ease-out;
}



.deployed-contract-remix {
    border: 1px solid rgba(71, 85, 105, 0.3);
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
    transition: all 0.2s;
}

.deployed-contract-remix:hover {
    border-color: rgba(85, 85, 85, 0.4);
}



.remix-contract-header:hover {
    background: rgba(85, 85, 85, 0.05);
}

.remix-contract-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.remix-contract-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-left: 1.75rem;
}

.remix-copy-address.copied {
    color: #4ade80;
}

.remix-pin-contract.pinned {
    color: #555555;
}

.remix-pin-contract.pinned svg {
    fill: currentColor;
}

.remix-contract-body {
    display: none;
    padding: 0 0.875rem 0.875rem 0.875rem;
    border-top: 1px solid rgba(71, 85, 105, 0.2);
}

.deployed-contract-remix.expanded .remix-contract-body {
    display: block;
}

.remix-functions {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding-top: 0.5rem;
}

.remix-function-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.remix-func-header {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    min-width: 0;
}

.remix-func-btn {
    flex: 1;
    padding: 0.55rem 0.75rem;
    min-height: 2.1rem;
    border: none;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.remix-func-view {
    /* Remix-like: view/pure buttons are blue/cyan */
    background: rgba(41, 182, 246, 0.85);
    color: #0b0f14; /* black-ish text on blue */
}

.remix-func-view:hover {
    background: rgba(41, 182, 246, 0.95);
}

.remix-func-write {
    /* Base write style; specific shade depends on presence of params */
    background: rgba(255, 167, 38, 0.95);
    color: #ffffff; /* white text on orange */
}

.remix-func-write:hover {
    background: rgba(255, 167, 38, 1);
    color: #ffffff;
}

.remix-func-payable {
    /* Payable: treat same family as write (orange) */
    background: rgba(255, 167, 38, 0.95);
    color: #ffffff;
}

.remix-func-payable:hover {
    background: rgba(255, 167, 38, 1);
    color: #ffffff;
}

/* Darker orange for functions that have params (closer to Remix UX) */
.remix-func-write.remix-has-params,
.remix-func-payable.remix-has-params {
    background: rgba(245, 124, 0, 0.95);
    color: #ffffff;
}

.remix-func-write.remix-has-params:hover,
.remix-func-payable.remix-has-params:hover {
    background: rgba(245, 124, 0, 1);
    color: #ffffff;
}

.remix-func-toggle {
    width: 1.75rem;
    height: 2.1rem;
    background: rgba(100, 116, 139, 0.1);
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: 0.25rem;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.remix-func-toggle:hover {
    background: rgba(100, 116, 139, 0.2);
    color: #cbd5e1;
}

.remix-toggle-arrow {
    width: 0.875rem;
    height: 0.875rem;
    transition: transform 0.2s;
}

.remix-func-params {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-left: 0.5rem;
}

.remix-func-input {
    padding: 0.375rem 0.5rem;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(71, 85, 105, 0.3);
    border-radius: 0.25rem;
    font-size: 0.6875rem;
    font-family: 'Courier New', monospace;
    color: #e0e0e0;
    outline: none;
    transition: border-color 0.2s;
}

.remix-func-input:focus {
    border-color: #555555;
}

.remix-func-input::placeholder {
    color: #64748b;
    font-style: italic;
}

.remix-func-result {
    padding-left: 0.5rem;
    font-size: 0.6875rem;
    margin-top: 0.25rem;
    min-width: 0;
    overflow: hidden;
}

/* Slightly smaller monospace for raw outputs */
.remix-func-result code {
    font-family: 'Courier New', monospace;
    font-size: 0.64rem;
    line-height: 1.25;
}

/* Keep long outputs (especially addresses / hashes) inside the card */
.remix-func-result code {
    display: inline;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.remix-loading {
    font-size: 12px;
    color: #6b7280;
    padding: 4px 8px;
    font-style: italic;
}

.remix-result-success,
.remix-result-error,
.remix-result-pending {
    /* Results are injected dynamically under each function button.
       Keep them visible (Remix-like UX). */
    display: block;
}

.remix-result-success {
    /* No frame/background — show content only */
    padding: 0;
    background: none;
    border: none;
    border-radius: var(--ui-radius);
    color: inherit;
    font-family: inherit;
}

.remix-result-pending {
    padding: 0;
    background: none;
    border: none;
    border-radius: var(--ui-radius);
    color: inherit;
    font-family: inherit;
}

.remix-result-error {
    padding: 0;
    background: none;
    border: none;
    border-radius: var(--ui-radius);
    color: #f87171;
    font-family: inherit;
}

.remix-result-success strong,
.remix-result-pending strong,
.remix-result-error strong {
    font-weight: 700;
    display: block;
    margin-bottom: 0.25rem;
}

.remix-delete-contract {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.25rem;
}

.remix-delete-contract:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.remix-delete-contract svg {
    width: 0.75rem;
    height: 0.75rem;
}

#contractSelect {
    font-family: 'Courier New', monospace;
    font-size: 0.8125rem;
}

#contractSelect option {
    padding: 0.5rem;
}

.compile-success-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: successPulse 0.5s ease-out;
}

.compile-success-badge svg {
    width: 10px;
    height: 10px;
    stroke: white;
}

@keyframes successPulse {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.remix-pin-contract {
    padding: 0.25rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remix-pin-contract svg {
    width: 16px;
    height: 16px;
}

.remix-pin-contract:hover {
    color: #555555;
    transform: scale(1.1);
}

.remix-pin-contract.pinned {
    color: #555555;
}

.remix-pin-contract.pinned svg {
    fill: currentColor;
}

.vertical-tab .tab-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    margin: auto;
    filter: brightness(0) invert(1);
}

.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-notification.hiding {
    transform: translateX(400px);
    opacity: 0;
}

.toast-notification.error {
    background: #ef4444;
}

.toast-notification.warning {
    background: #f59e0b;
}

.toast-notification svg {
    width: 18px;
    height: 18px;
}

.toast-success {
    background: #10b981;
}

.toast-info {
    background: #555555;
}

.toast-warning {
    background: #f59e0b;
}

.toast-error {
    background: #ef4444;
}

.network-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    color: white;
    margin-left: 8px;
}

.remix-func-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #374151;
    border-radius: 4px;
    background: #1f2937;
    color: white;
    font-size: 12px;
    margin-bottom: 4px;
}

.remix-func-input:focus {
    outline: none;
    border-color: #555555;
}

.remix-func-input::placeholder {
    color: #9ca3af;
}


.remix-result-success {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
    padding: 8px;
    border-radius: 4px;
    margin-top: 8px;
    font-size: 12px;
}

.remix-result-error {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
    padding: 8px;
    border-radius: 4px;
    margin-top: 8px;
    font-size: 12px;
}

.remix-result-pending {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    padding: 8px;
    border-radius: 4px;
    margin-top: 8px;
    font-size: 12px;
}

.contract-balance {
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    color: white;
}

.remix-contract-header {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    user-select: none;
    border-bottom: 1px solid #333333;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.remix-contract-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
}

.remix-contract-main-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.remix-contract-secondary-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: space-between;
}

.remix-arrow {
    width: 0.875rem;
    height: 0.875rem;
    color: #ffffff;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.remix-contract-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.remix-contract-name {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #e0e0e0;
    font-size: 0.8rem;
    flex-shrink: 0;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.remix-address-short {
    font-family: 'Courier New', monospace;
    color: #94a3b8;
    font-size: 0.75rem;
    flex-shrink: 0;
    margin-right: 0.5rem;
    white-space: nowrap;
}

.remix-balance-network {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.contract-balance {
    font-weight: 600;
    color: #4ade80;
}


.remix-contract-details {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.contract-full-address {
    font-family: 'Courier New', monospace;
    color: #64748b;
    font-size: 0.7rem;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.remix-contract-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
    margin-left: auto;
    padding-left: 0.5rem;
    min-width: fit-content;
}

.remix-copy-address,
.remix-delete-contract {
    width: 1.25rem;
    height: 1.25rem;
    padding: 0.125rem;
    background: transparent;
    border: none;
    border-radius: 0.25rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.remix-copy-address:hover {
    background: rgba(85, 85, 85, 0.2);
    color: #555555;
}

.remix-delete-contract:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.remix-copy-address svg,
.remix-delete-contract svg {
    width: 0.625rem;
    height: 0.625rem;
}

@media (max-width: 768px) {
    .remix-contract-header {
        padding: 0.375rem 0.5rem;
        gap: 0.2rem;
    }
    
    .remix-contract-row {
        gap: 0.25rem;
    }
    
    .remix-contract-main-row {
        gap: 0.25rem;
    }
    
    .remix-contract-secondary-row {
        gap: 0.25rem;
    }
    
    .remix-contract-name {
        max-width: 100px;
        font-size: 0.75rem;
    }
    
    .remix-address-short {
        font-size: 0.7rem;
    }
    
    .contract-balance {
        font-size: 0.65rem;
    }
    
    .remix-contract-meta {
        padding-left: 1.5rem;
        margin-top: 0.2rem;
        gap: 0.4rem;
    }
    
    .network-badge {
        font-size: 0.6rem;
        padding: 0.125rem 0.25rem;
    }
    
    .contract-full-address {
        font-size: 0.65rem;
    }
    
    .remix-contract-actions {
        gap: 0.2rem;
    }
    
    .remix-copy-address,
    .remix-delete-contract {
        width: 1.1rem;
        height: 1.1rem;
        padding: 0.1rem;
    }
    
    .remix-copy-address svg,
    .remix-delete-contract svg {
        width: 0.55rem;
        height: 0.55rem;
    }
}

.deployed-contract-remix.expanded .remix-arrow {
    transform: rotate(90deg);
}

/* Constructor Parameters Inline */
.constructor-params-container {
    margin-top: 15px;
    padding: 15px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 8px;
    margin-bottom: 15px;
}

.constructor-params-title {
    color: #555555;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.constructor-param-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.constructor-param-row:last-child {
    margin-bottom: 0;
}

.constructor-param-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    min-width: 150px;
    text-align: right;
}

.constructor-param-label .param-type {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    margin-left: 4px;
}

.constructor-param-input {
    flex: 1;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    font-family: 'Courier New', monospace;
}

.constructor-param-input:focus {
    outline: none;
    border-color: #555555;
    box-shadow: 0 0 0 2px rgba(85, 85, 85, 0.1);
}

.constructor-param-input.error {
    border-color: #ff4757;
    background: rgba(255, 71, 87, 0.1);
}

.constructor-param-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
}

.param-error-inline {
    color: #ff4757;
    font-size: 11px;
    margin-left: 160px;
    margin-top: -8px;
    margin-bottom: 8px;
}

.search-results {
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: var(--ui-radius);
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item:hover {
    background: rgba(42, 42, 42, 0.5);
}

.search-result-item:active {
    background: rgba(42, 42, 42, 0.7);
}

.gas-analysis-box {
    background: rgba(42, 42, 42, 0.5);
    border: 1px solid #333333;
    border-radius: var(--ui-radius);
    padding: 1rem;
}

.gas-analysis-header h4 {
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0;
}

.gas-analysis-content {
    font-size: 0.75rem;
    color: #94a3b8;
}