* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    transition: background-color 0.3s, color 0.3s;
}

body.dark {
    background-color: #111827;
    color: #f3f4f6;
}

body.light {
    background-color: #ffffff;
    color: #111827;
}

.header {
    border-bottom: 1px solid;
    padding: 1.5rem 2rem;
}

body.dark .header {
    border-color: #1f2937;
    background-color: #1f2937;
}

body.light .header {
    border-color: #e5e7eb;
    background-color: #f9fafb;
}

.header-content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-size: 2rem;
    color: #3b82f6;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bi {
    font-size: 1rem;
    vertical-align: middle;
}

.btn .bi {
    font-size: 0.95rem;
}

h1 {
    font-size: 1.5rem;
    font-weight: bold;
}

.subtitle {
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

body.dark .subtitle {
    color: #9ca3af;
}

body.light .subtitle {
    color: #6b7280;
}

.theme-btn {
    padding: 0.5rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    background: transparent;
    color: inherit;
}

body.dark .theme-btn:hover {
    background-color: #374151;
}

body.light .theme-btn:hover {
    background-color: #e5e7eb;
}

.toolbar {
    border-bottom: 1px solid;
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    z-index: 99;
}

body.dark .toolbar {
    border-color: #1f2937;
    background-color: #1f2937;
}

body.light .toolbar {
    border-color: #e5e7eb;
    background-color: #f9fafb;
}

.toolbar-content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    transition: background-color 0.2s;
    white-space: nowrap;
}

body.dark .btn-default {
    background-color: #374151;
    color: #f3f4f6;
}

body.dark .btn-default:hover {
    background-color: #4b5563;
}

body.light .btn-default {
    background-color: #e5e7eb;
    color: #111827;
}

body.light .btn-default:hover {
    background-color: #d1d5db;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background-color: #2563eb;
}

.btn-success {
    background-color: #10b981;
    color: white;
}

.btn-success:hover {
    background-color: #059669;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 10;
    display: none;
}

body.dark .dropdown-menu {
    background-color: #374151;
}

body.light .dropdown-menu {
    background-color: white;
    border: 1px solid #e5e7eb;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    width: 100%;
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    color: inherit;
    font-size: 0.875rem;
}

body.dark .dropdown-item:hover {
    background-color: #4b5563;
}

body.light .dropdown-item:hover {
    background-color: #f3f4f6;
}

.toolbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
}

.editor-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem;
}

.editor-wrapper {
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid;
}

body.dark .editor-wrapper {
    border-color: #1f2937;
    background-color: #1f2937;
}

body.light .editor-wrapper {
    border-color: #d1d5db;
    background-color: #f9fafb;
}

.editor-flex {
    display: flex;
}

.line-numbers {
    user-select: none;
    text-align: right;
    padding: 1rem 1rem 1rem 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5rem;
}

body.dark .line-numbers {
    background-color: #0f172a;
    color: #6b7280;
}

body.light .line-numbers {
    background-color: #f3f4f6;
    color: #9ca3af;
}

.editor {
    flex: 1;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5rem;
    border: none;
    outline: none;
    resize: none;
    min-height: 500px;
    tab-size: 4;
    white-space: pre;
    overflow-wrap: normal;
    overflow-x: auto;
}

body.dark .editor {
    background-color: #1f2937;
    color: #f3f4f6;
}

body.light .editor {
    background-color: #f9fafb;
    color: #111827;
}

.footer-info {
    max-width: 1280px;
    margin: 1rem auto 0;
    padding: 0 1.5rem;
    font-size: 0.875rem;
}

body.dark .footer-info {
    color: #6b7280;
}

body.light .footer-info {
    color: #6b7280;
}

.footer-info code {
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
}

body.dark .footer-info code {
    background-color: #1f2937;
}

body.light .footer-info code {
    background-color: #e5e7eb;
}

/* Modal Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 0.75rem;
    padding: 2rem;
}

body.dark .modal {
    background-color: #1f2937;
    color: #f3f4f6;
}

body.light .modal {
    background-color: white;
    color: #111827;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: bold;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: inherit;
    padding: 0.25rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid;
    font-size: 0.875rem;
}

body.dark .form-input {
    background-color: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}

body.light .form-input {
    background-color: white;
    border-color: #d1d5db;
    color: #111827;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
}

.help-text {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

body.dark .help-text {
    color: #9ca3af;
}

body.light .help-text {
    color: #6b7280;
}

.btn-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.btn-block {
    flex: 1;
}

/* Upload Progress Modal Styles */
.upload-modal {
    width: 90%;
    max-width: 400px;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
}

.spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    border: 4px solid;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

body.dark .spinner {
    border-color: #374151;
    border-top-color: #3b82f6;
}

body.light .spinner {
    border-color: #e5e7eb;
    border-top-color: #3b82f6;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.upload-status {
    margin-top: 1rem;
}

.upload-status h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.upload-status p {
    font-size: 0.875rem;
}

body.dark .upload-status p {
    color: #9ca3af;
}

body.light .upload-status p {
    color: #6b7280;
}

.upload-details {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

body.dark .upload-details {
    background-color: #374151;
}

body.light .upload-details {
    background-color: #f3f4f6;
}

.upload-complete-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #10b981;
}

.upload-complete-icon i {
    font-size: 2rem;
    color: white;
}

.upload-progress-bar {
    width: 100%;
    height: 8px;
    background-color: #374151;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 1rem;
}

.upload-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #10b981);
    width: 0%;
    transition: width 0.3s ease;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    h1 {
        font-size: 1.25rem;
    }

    .subtitle {
        font-size: 0.75rem;
    }

    .toolbar {
        padding: 0.5rem;
        overflow-x: auto;
    }

    .toolbar-content {
        gap: 0.25rem;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .btn {
        padding: 0.4rem 0.5rem;
        font-size: 0.7rem;
        gap: 0.2rem;
        flex-shrink: 0;
    }

    .btn .bi {
        font-size: 1rem;
    }

    .btn-text {
        font-size: 0.7rem;
    }

    .toolbar-right {
        display: flex;
        gap: 0.25rem;
        margin-left: 0.5rem;
        flex-shrink: 0;
    }

    .checkbox-label {
        font-size: 0.7rem;
        white-space: nowrap;
    }

    .dropdown-menu {
        font-size: 0.75rem;
        min-width: 140px;
    }

    .dropdown-item {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }

    .editor-container {
        padding: 0.75rem;
    }

    .footer-info {
        font-size: 0.75rem;
        padding: 0 0.75rem;
    }

    .modal {
        width: 95%;
        padding: 1.5rem;
    }

    .modal-header h2 {
        font-size: 1.25rem;
    }

    .upload-modal {
        padding: 1.5rem;
    }

    .spinner {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0.75rem 0.5rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    h1 {
        font-size: 1rem;
    }

    .subtitle {
        display: none;
    }

    .toolbar {
        padding: 0.4rem;
    }

    .toolbar-content {
        gap: 0.2rem;
    }

    .btn {
        padding: 0.35rem 0.4rem;
        font-size: 0.65rem;
        min-width: auto;
    }

    .btn .bi {
        font-size: 0.95rem;
    }

    .btn-text {
        display: none;
    }

    .checkbox-label span {
        display: none;
    }

    .dropdown-menu {
        min-width: 120px;
        font-size: 0.7rem;
    }

    .dropdown-item {
        padding: 0.35rem 0.5rem;
        font-size: 0.7rem;
    }

    .dropdown-item .bi {
        font-size: 0.75rem;
        margin-right: 0.25rem;
    }
}

/* File Documentation Tooltip Styles */
.file-doc-tooltip {
    position: absolute;
    z-index: 1000;
    max-width: 350px;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.file-doc-tooltip.show {
    opacity: 1;
    pointer-events: auto;
}

body.dark .file-doc-tooltip {
    background-color: #1f2937;
    border: 1px solid #374151;
    color: #f3f4f6;
}

body.light .file-doc-tooltip {
    background-color: white;
    border: 1px solid #d1d5db;
    color: #111827;
}

.file-doc-tooltip .tooltip-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid;
}

body.dark .file-doc-tooltip .tooltip-header {
    border-color: #374151;
}

body.light .file-doc-tooltip .tooltip-header {
    border-color: #e5e7eb;
}

.file-doc-tooltip .tooltip-header .file-icon {
    font-size: 1.25rem;
}

.file-doc-tooltip .tooltip-header .file-name {
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.file-doc-tooltip .tooltip-description {
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.file-doc-tooltip .tooltip-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.file-doc-tooltip .tooltip-tag {
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

body.dark .file-doc-tooltip .tooltip-tag {
    background-color: #374151;
    color: #9ca3af;
}

body.light .file-doc-tooltip .tooltip-tag {
    background-color: #f3f4f6;
    color: #6b7280;
}

.file-doc-tooltip .tooltip-examples {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid;
    font-size: 0.8rem;
}

body.dark .file-doc-tooltip .tooltip-examples {
    border-color: #374151;
    color: #9ca3af;
}

body.light .file-doc-tooltip .tooltip-examples {
    border-color: #e5e7eb;
    color: #6b7280;
}

.file-doc-tooltip .tooltip-examples strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
}

/* Info Icon Button in Editor */
.editor-with-info {
    position: relative;
}

.file-info-trigger {
    display: inline-block;
    cursor: help;
    margin-left: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s;
    color: #3b82f6;
    font-size: 0.85em;
    vertical-align: middle;
}

.editor:hover .file-info-trigger,
.file-info-trigger:hover {
    opacity: 1;
}

/* File Documentation Panel */
.file-doc-panel {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    padding: 2rem;
    overflow-y: auto;
    transition: right 0.3s ease;
    z-index: 100;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
}

.file-doc-panel.open {
    right: 0;
}

body.dark .file-doc-panel {
    background-color: #1f2937;
    color: #f3f4f6;
}

body.light .file-doc-panel {
    background-color: white;
    color: #111827;
}

.file-doc-panel .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.file-doc-panel .panel-header h3 {
    font-size: 1.25rem;
    font-weight: bold;
}

.file-doc-panel .close-panel-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: inherit;
    padding: 0.25rem;
}

.file-doc-panel .file-doc-item {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

body.dark .file-doc-panel .file-doc-item {
    background-color: #374151;
}

body.light .file-doc-panel .file-doc-item {
    background-color: #f9fafb;
}

body.dark .file-doc-panel .file-doc-item:hover {
    background-color: #4b5563;
}

body.light .file-doc-panel .file-doc-item:hover {
    background-color: #f3f4f6;
}

.file-doc-panel .file-doc-item h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-family: 'Courier New', monospace;
}

.file-doc-panel .file-doc-item p {
    font-size: 0.875rem;
    line-height: 1.5;
}

body.dark .file-doc-panel .file-doc-item p {
    color: #d1d5db;
}

body.light .file-doc-panel .file-doc-item p {
    color: #6b7280;
}

.file-doc-panel .search-box {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    border: 1px solid;
    font-size: 0.875rem;
}

body.dark .file-doc-panel .search-box {
    background-color: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}

body.light .file-doc-panel .search-box {
    background-color: white;
    border-color: #d1d5db;
    color: #111827;
}

.file-doc-panel .search-box:focus {
    outline: none;
    border-color: #3b82f6;
}

@media (max-width: 768px) {
    .file-doc-panel {
        width: 100%;
        right: -100%;
    }
    
    .file-doc-tooltip {
        max-width: 280px;
        padding: 0.75rem;
    }
}

/* Dependency Graph Styles */
.dependency-graph-modal {
    max-width: 90vw;
    width: 1200px;
    max-height: 90vh;
    padding: 1.5rem;
}

.graph-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
}

.graph-container {
    width: 100%;
    height: 500px;
    border-radius: 0.5rem;
    border: 1px solid;
    position: relative;
}

body.dark .graph-container {
    background-color: #0f172a;
    border-color: #374151;
}

body.light .graph-container {
    background-color: #f9fafb;
    border-color: #d1d5db;
}

.graph-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
}

body.dark .graph-stats {
    background-color: #374151;
}

body.light .graph-stats {
    background-color: #f3f4f6;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

body.dark .stat-label {
    color: #9ca3af;
}

body.light .stat-label {
    color: #6b7280;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #3b82f6;
}

.graph-legend {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
}

body.dark .graph-legend {
    background-color: #374151;
}

body.light .graph-legend {
    background-color: #f3f4f6;
}

.graph-legend h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-block;
}

.graph-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 2rem;
}

.graph-empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.graph-empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.graph-empty-state p {
    font-size: 0.875rem;
}

body.dark .graph-empty-state p {
    color: #9ca3af;
}

body.light .graph-empty-state p {
    color: #6b7280;
}

@media (max-width: 768px) {
    .dependency-graph-modal {
        width: 95vw;
        max-width: 95vw;
        padding: 1rem;
    }
    
    .graph-container {
        height: 400px;
    }
    
    .graph-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .legend-items {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Cache Manager Styles */
.cache-stats {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

body.dark .cache-stats {
    background-color: #374151;
}

body.light .cache-stats {
    background-color: #f3f4f6;
}

.cache-stats p {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.cache-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.cache-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.dark .cache-item {
    background-color: #374151;
}

body.light .cache-item {
    background-color: #f3f4f6;
}

.cache-item-info {
    flex: 1;
}

.cache-item-info h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.cache-item-info p {
    font-size: 0.75rem;
}

body.dark .cache-item-info p {
    color: #9ca3af;
}

body.light .cache-item-info p {
    color: #6b7280;
}

.cache-item-actions button {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Share Modal Styles */
body.dark #shareResult {
    background-color: #10b981;
    color: white;
}

body.light #shareResult {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

/* GitHub Import Modal Styles */
.github-examples {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

body.dark .github-examples {
    background-color: #374151;
}

body.light .github-examples {
    background-color: #f3f4f6;
}

body.dark #githubProgress {
    background-color: #374151;
}

body.light #githubProgress {
    background-color: #f3f4f6;
}

#githubProgress .spinner {
    border-color: #374151;
    border-top-color: #3b82f6;
}

body.light #githubProgress .spinner {
    border-color: #e5e7eb;
    border-top-color: #3b82f6;
}

/* ============================================
   EXPORT PNG/PDF STYLES
   ============================================ */

/* Dropdown enhancements */
.dropdown-section-label {
    padding: 0.35rem 1rem 0.2rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.5;
}

.dropdown-divider {
    height: 1px;
    margin: 0.35rem 0;
}

body.dark .dropdown-divider { background: #4b5563; }
body.light .dropdown-divider { background: #e5e7eb; }

.badge-new {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.65rem;
    font-weight: 700;
    margin-left: 0.35rem;
    vertical-align: middle;
    background: #3b82f6;
    color: white;
}

/* Export Modal */
.export-modal {
    max-width: 680px;
    width: 95%;
}

/* Theme Grid */
.export-theme-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.export-theme-card {
    border-radius: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.15s ease;
    text-align: center;
}

body.dark .export-theme-card  { background: #374151; }
body.light .export-theme-card { background: #f3f4f6; }

.export-theme-card:hover  { border-color: #3b82f6; transform: translateY(-1px); }
.export-theme-card.active { border-color: #3b82f6; }

.export-theme-card p {
    margin: 0.35rem 0 0;
    font-size: 0.72rem;
    font-weight: 600;
}

.theme-preview {
    border-radius: 0.3rem;
    padding: 0.4rem 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.6rem;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.dark-pro-preview  { background: #0f172a; color: #e2e8f0; }
.light-clean-preview { background: #ffffff; color: #1e293b; border: 1px solid #e2e8f0; }
.ocean-preview     { background: #0c1e3c; color: #7dd3fc; }
.forest-preview    { background: #0d1f12; color: #86efac; }
.sunset-preview    { background: #1c0a00; color: #fbbf24; }
.terminal-preview  { background: #000000; color: #22c55e; }

/* Export Options Row */
.export-options-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

/* Preview */
.export-preview-wrap {
    margin-bottom: 1.25rem;
}

.export-preview-label {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

.export-preview-scroll {
    border-radius: 0.5rem;
    overflow: auto;
    max-height: 260px;
    border: 1px solid;
    padding: 0.5rem;
}

body.dark .export-preview-scroll  { border-color: #374151; background: #0f172a; }
body.light .export-preview-scroll { border-color: #e5e7eb; background: #f8fafc; }

/* ---- EXPORT CANVAS (the actual image) ---- */
.export-canvas {
    width: 640px;
    min-height: 200px;
    border-radius: 0.75rem;
    overflow: hidden;
    font-family: 'Courier New', monospace;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
}

/* themes */
.dark-pro-theme   { background: #0f172a; color: #e2e8f0; }
.light-clean-theme { background: #ffffff; color: #1e293b; border: 2px solid #e2e8f0; }
.ocean-theme      { background: #0c1e3c; color: #7dd3fc; }
.forest-theme     { background: #0d1f12; color: #86efac; }
.sunset-theme     { background: #1a0900; color: #fbbf24; }
.terminal-theme   { background: #000000; color: #22c55e; }

/* Canvas header (window chrome) */
.export-canvas-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.light-clean-theme .export-canvas-header { border-color: #e2e8f0; }

.export-window-dots {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

.export-window-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: block;
}

.export-window-dots span:nth-child(1) { background: #ef4444; }
.export-window-dots span:nth-child(2) { background: #f59e0b; }
.export-window-dots span:nth-child(3) { background: #22c55e; }

.export-canvas-title {
    flex: 1;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    opacity: 0.9;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.export-canvas-meta {
    font-size: 0.7rem;
    opacity: 0.45;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Canvas body */
.export-canvas-body {
    padding: 1.25rem 1.5rem;
    flex: 1;
}

.export-code {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    line-height: 1.7;
    white-space: pre;
    overflow: hidden;
}

/* Canvas footer */
.export-canvas-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    font-size: 0.68rem;
    opacity: 0.5;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.light-clean-theme .export-canvas-footer { border-color: #e2e8f0; }

/* Syntax coloring per theme (tree characters get accent color) */
.dark-pro-theme .export-code   { color: #94a3b8; }
.ocean-theme .export-code      { color: #7dd3fc; }
.forest-theme .export-code     { color: #86efac; }
.sunset-theme .export-code     { color: #fbbf24; }
.terminal-theme .export-code   { color: #22c55e; }
.light-clean-theme .export-code { color: #475569; }

@media (max-width: 768px) {
    .export-theme-grid { grid-template-columns: repeat(2, 1fr); }
    .export-canvas { width: 100%; min-width: 300px; }
    .export-options-row { flex-direction: column; gap: 0; }
}

/* Export success flash */
.export-success-flash {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #10b981;
    color: white;
    padding: 0.85rem 1.75rem;
    border-radius: 0.65rem;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 8px 30px rgba(16,185,129,0.4);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
}
.export-success-flash.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Logo image fix */
.logo-section img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
}

.logo-section .responsive,
.logo-section .resposive {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

/* Responsive logo sizing */
@media (max-width: 768px) {
    .logo-section img {
        width: 32px;
        height: 32px;
    }
}