@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

@font-face {
    font-family: "MinecraftSeven";
    src: url('https://misode.github.io/fonts/seven.ttf') format("truetype");
}

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

:root {
    --primary: #7c3aed;
    --primary-light: #a78bfa;
    --primary-dark: #5b21b6;
    --secondary: #ec4899;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --info: #3b82f6;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-input: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border: #334155;
    --shadow: rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    min-height: 100vh;
    padding: 2rem;
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(124, 58, 237, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 40% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.minecraft-container {
    max-width: 1800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.mc-header {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2) 0%, rgba(236, 72, 153, 0.2) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 20px 60px var(--shadow);
    position: relative;
    overflow: hidden;
}

.mc-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.mc-title {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #a78bfa 0%, #ec4899 50%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    text-shadow: 0 0 60px rgba(124, 58, 237, 0.5);
}

.mc-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.mc-panel {
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 60px var(--shadow);
}

.mc-panel:hover {
    box-shadow: 0 22px 65px var(--shadow);
}

.mc-panel-title {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mc-button {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    padding: 0.875rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    text-align: center;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
    position: relative;
    overflow: hidden;
}

.mc-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.mc-button:hover::before {
    left: 100%;
}

.mc-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.mc-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

.mc-button-red {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.mc-button-red:hover {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.mc-button-green {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.mc-button-green:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.mc-button-blue {
    background: linear-gradient(135deg, var(--info) 0%, #2563eb 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.mc-button-blue:hover {
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.mc-button-gold {
    background: linear-gradient(135deg, var(--accent) 0%, #d97706 100%);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.mc-button-gold:hover {
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.mc-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    font-family: 'Inter', sans-serif;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.mc-input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
    background: rgba(15, 23, 42, 0.8);
}

.mc-input::placeholder {
    color: var(--text-muted);
}

.mc-textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    font-family: 'Inter', sans-serif;
    resize: vertical;
    min-height: 90px;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
    line-height: 1.5;
}

.mc-textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
    background: rgba(15, 23, 42, 0.8);
}

.mc-select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    font-family: 'Inter', sans-serif;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mc-select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.mc-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
}

.mc-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin-right: 0.75rem;
    accent-color: var(--primary);
}

.mc-checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    background: rgba(15, 23, 42, 0.5);
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.mc-checkbox-group:hover {
    border-color: var(--primary-light);
    background: rgba(15, 23, 42, 0.7);
}

.mc-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    padding: 0.5rem;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 12px;
}

.mc-tab {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-muted);
    padding: 0.625rem 1.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mc-tab.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.mc-tab:hover:not(.active) {
    background: rgba(124, 58, 237, 0.1);
    color: var(--text-secondary);
    border-color: var(--border);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.mc-item {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    position: relative;
    transition: all 0.2s ease;
}

.mc-item:hover {
    border-color: var(--primary-light);
    background: rgba(15, 23, 42, 0.8);
    transform: translateX(4px);
}

.mc-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.mc-item-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mc-item-actions {
    display: flex;
    gap: 0.5rem;
}

.mc-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, var(--accent) 0%, #d97706 100%);
    border-radius: 6px;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    margin-left: 0.5rem;
}

.mc-badge-blue {
    background: linear-gradient(135deg, var(--info) 0%, #2563eb 100%);
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
    font-size: 0.9375rem;
    background: rgba(15, 23, 42, 0.4);
    border: 2px dashed var(--border);
    border-radius: 12px;
    font-style: italic;
}

.preview-wrapper {
    position: relative;
    height: 500px;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 2rem;
}

.preview-background {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: url('background.png') center/cover no-repeat;
    filter: blur(5px);
    z-index: 1;
}

.preview-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.preview-dialog {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 500px;
    background: transparent;
}

.preview-overlay {
    height: min-content;
    position: relative;
    cursor: default;
}

.preview-overlay > img {
    display: block;
    width: 100%;
}

.preview-overlay > div {
    position: absolute;
}

.dialog-preview {
    cursor: default;
}

.dialog-preview * {
    flex-shrink: 0;
}

.dialog-preview .text-component {
    font-family: MinecraftSeven, sans-serif;
    font-size: calc(var(--dialog-px) * 10);
    white-space: pre-wrap;
    word-break: break-word;
}

.dialog-preview .text-component span {
    text-shadow: calc(var(--dialog-px) * 1) calc(var(--dialog-px) * 1) var(--shadow-color, transparent);
}

.dialog-body {
    text-align: center;
}

.dialog-button,
.dialog-edit-box,
.dialog-checkbox,
.dialog-slider-track,
.dialog-slider-handle,
.dialog-tooltip {
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-crisp-edges;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}

.dialog-warning-button {
    flex-shrink: 0;
    background-image: url(images/dialog/warning_button.png);
    background-size: contain;
    cursor: pointer;
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-crisp-edges;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}

.dialog-warning-button:hover {
    background-image: url(images/dialog/warning_button_highlighted.png);
}

.dialog-button {
    border: solid calc(var(--dialog-px)*2) #000;
    border-bottom-width: calc(var(--dialog-px)*3);
    border-image-source: url(images/dialog/button.png);
    border-image-slice: 2 2 3 2 fill;
    border-image-repeat: repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: var(--dialog-px);
    overflow: hidden;
}

.dialog-button:hover {
    border-image-source: url(images/dialog/button_highlighted.png);
}

.dialog-edit-box {
    border: solid calc(var(--dialog-px) * 1) #000;
    border-image-source: url(images/dialog/text_field.png);
    border-image-slice: 1 fill;
    border-image-repeat: repeat;
    display: flex;
    align-items: flex-start;
    padding-top: calc(var(--dialog-px) * 4);
    padding-left: calc(var(--dialog-px) * 4);
}

.dialog-checkbox {
    background-image: url(images/dialog/checkbox.png);
    background-size: contain;
}

.dialog-checkbox.dialog-selected {
    background-image: url(images/dialog/checkbox_selected.png);
}

.dialog-slider {
    position: relative;
}

.dialog-slider-track {
    border: solid calc(var(--dialog-px) * 1) #000;
    border-image-source: url(images/dialog/slider.png);
    border-image-slice: 1 fill;
    border-image-repeat: repeat;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.dialog-slider-handle {
    background-image: url(images/dialog/slider_handle.png);
    background-size: contain;
    position: absolute;
    top: 0;
    left: 50%;
    width: calc(var(--dialog-px) * 8);
    height: 100%;
    transform: translateX(-50%);
}

.dialog-slider-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: var(--dialog-px);
}

.dialog-tooltip {
    padding: calc(var(--dialog-px) * 4) calc(var(--dialog-px) * 6);
    border: solid calc(var(--dialog-px) * 2) #220044;
    border-image-source: url(images/tooltip.png);
    border-image-slice: 2 fill;
    border-image-outset: calc(var(--dialog-px) * 1);
    width: max-content;
    max-width: calc(var(--dialog-px) * 150);
    display: none;
    position: absolute;
    pointer-events: none;
}

.tooltip-container {
    position: relative;
}

.tooltip-container:hover > .dialog-tooltip {
    display: block;
}

.tooltip-container > .dialog-tooltip .text-component {
    white-space: pre-wrap;
    text-align: initial;
}


.preview-console {
    margin-top: 1rem;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.preview-console-header {
    background: rgba(124, 58, 237, 0.2);
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.preview-console-content {
    padding: 1rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.8125rem;
    line-height: 1.6;
    max-height: 200px;
    overflow-y: auto;
    color: var(--text-primary);
}

.preview-console-content > div {
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    border-left: 3px solid var(--primary);
}

.preview-console-content > div:last-child {
    margin-bottom: 0;
}

.console-action-type {
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.console-action-data {
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.code-preview {
    background: rgba(0, 0, 0, 0.7);
    color: #a5f3fc;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.8125rem;
    overflow-x: auto;
    max-height: 600px;
    overflow-y: auto;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.mc-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.mc-modal.show {
    display: flex;
}

.mc-modal-content {
    background: rgba(30, 41, 59, 0.98);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.2s ease;
}

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

.mc-modal-header {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.mc-modal-footer {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    justify-content: flex-end;
}

.button-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.mc-info-box {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(147, 51, 234, 0.15) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.info-link {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
}

.info-link:hover {
    color: var(--secondary);
    border-bottom-color: var(--secondary);
}

.mc-warning-box {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(239, 68, 68, 0.15) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.action-preview {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.875rem;
    margin-top: 0.75rem;
    font-size: 0.8125rem;
}

.action-item {
    background: rgba(51, 65, 85, 0.5);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.action-item:hover {
    background: rgba(51, 65, 85, 0.7);
    border-color: var(--primary-light);
}

.action-type {
    color: var(--success);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.action-data {
    color: var(--text-secondary);
    flex: 1;
    font-size: 0.8125rem;
}

.github-link {
    text-align: center;
    padding: 2rem;
    margin-top: 2rem;
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.github-link a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
}

.github-link a:hover {
    color: var(--secondary);
    border-bottom-color: var(--secondary);
}

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

    .mc-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .mc-header {
        padding: 2rem 1.5rem;
    }

    .mc-title {
        font-size: 2rem;
    }

    .mc-subtitle {
        font-size: 1rem;
    }

    .mc-panel {
        padding: 1.5rem;
    }

    .preview-buttons:has(.preview-button:only-child),
    .preview-button:last-child:nth-child(odd) {
        max-width: 100%;
    }
}

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 10px;
    border: 2px solid var(--bg-dark);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary) 100%);
}
