@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

:root {
    --mc-grey: #c6c6c6;
    --mc-dark-grey: #555555;
    --mc-shadow: #373737;
    --mc-outline: #000000;
    --mc-highlight: #ffffff;
    --mc-button-hover: #9cf57e;
    --mc-text: #ffffff;
    --mc-text-shadow: #3f3f3f;
}

body {
    background-color: #555555;
    background-repeat: repeat;
    background-size: 64px;
    image-rendering: pixelated;
    font-family: 'VT323', monospace;
    color: var(--mc-text);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 1000px;
    padding: 20px;
    text-align: center;
}

header {
    margin-bottom: 20px;
}

.main-logo {
    max-width: 100%;
    height: auto;
    max-height: 180px;
    image-rendering: pixelated;
}

.preview-grid {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    margin-bottom: 40px;
}

.preview-card {
    background-color: var(--mc-grey);
    border: 4px solid var(--mc-outline);
    border-top-color: var(--mc-highlight);
    border-left-color: var(--mc-highlight);
    border-right-color: var(--mc-shadow);
    border-bottom-color: var(--mc-shadow);
    padding: 15px;
    width: 120px;
}

.preview-card h3 {
    color: #404040;
    font-size: 18px;
    margin: 0 0 10px 0;
}

.skin-view-wrapper {
    background-color: #000;
    border: 2px solid var(--mc-shadow);
    display: inline-block;
    padding: 4px;
}

.skin-view {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skin-view img {
    image-rendering: pixelated;
    width: 100%;
    height: 100%;
}

.tool-section {
    flex: 1;
    min-width: 320px;
}

.upload-zone {
    background-color: rgba(0, 0, 0, 0.7);
    border: 4px dashed var(--mc-dark-grey);
    padding: 30px;
    position: relative;
    cursor: pointer;
    margin-bottom: 20px;
}

.upload-zone:hover {
    border-color: var(--mc-highlight);
    background-color: rgba(255, 255, 255, 0.1);
}

.upload-zone p {
    font-size: 20px;
    margin: 0;
    color: var(--mc-grey);
}

.upload-zone input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.btn {
    display: inline-block;
    background-color: var(--mc-grey);
    border: 4px solid var(--mc-outline);
    border-top-color: var(--mc-highlight);
    border-left-color: var(--mc-highlight);
    border-right-color: var(--mc-shadow);
    border-bottom-color: var(--mc-shadow);
    color: #404040;
    padding: 10px 30px;
    font-size: 24px;
    font-family: 'VT323', monospace;
    cursor: pointer;
    width: 100%;
    max-width: 320px;
}

.btn:hover:not(:disabled) {
    background-color: #e0e0e0;
    border-color: var(--mc-outline);
    border-top-color: #ffffff;
    border-left-color: #ffffff;
    color: #000;
}

.btn:active:not(:disabled) {
    border-top-color: var(--mc-shadow);
    border-left-color: var(--mc-shadow);
    border-right-color: var(--mc-highlight);
    border-bottom-color: var(--mc-highlight);
}

.btn:disabled {
    background-color: #888;
    color: #555;
    cursor: not-allowed;
    border-top-color: #555;
    border-left-color: #555;
    border-right-color: #aaa;
    border-bottom-color: #aaa;
}

.status-msg {
    margin-top: 20px;
    padding: 10px;
    font-size: 20px;
}

.status-msg.success {
    color: #55ff55;
}

.status-msg.error {
    color: #ff5555;
}

.instruction-box {
    background: rgba(0, 0, 0, 0.7);
    border: 3px solid #4a5a7a;
    padding: 20px;
    text-align: left;
    margin-top: 20px;
}

.instruction-box strong {
    color: var(--mc-grey);
    font-size: 24px;
    display: block;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.instruction-box p {
    margin: 8px 0;
    font-size: 18px;
    color: var(--mc-grey);
}

.instruction-box p strong {
    display: inline;
    color: var(--mc-highlight);
    font-size: inherit;
    margin-right: 5px;
}

/* Warning Modal Styles */
.warning-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.warning-modal {
    background-color: var(--mc-grey);
    border: 4px solid var(--mc-outline);
    border-top-color: var(--mc-highlight);
    border-left-color: var(--mc-highlight);
    border-right-color: var(--mc-shadow);
    border-bottom-color: var(--mc-shadow);
    padding: 30px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

.warning-modal h2 {
    color: #ff5555;
    font-size: 32px;
    text-shadow: 2px 2px 0px #3f0000;
    margin-top: 0;
}

.warning-modal p {
    color: #404040;
    font-size: 20px;
    line-height: 1.4;
    margin: 20px 0;
}

.warning-modal .btns {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.warning-modal .btn {
    width: auto;
    font-size: 18px;
}

.color-analysis-section {
    margin: 20px 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid var(--mc-dark-grey);
}

.color-analysis-section h4,
.overlay-selection h4 {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: var(--mc-grey);
}

.overlay-selection {
    margin: 20px 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid var(--mc-dark-grey);
}

.overlay-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.overlay-btn {
    background-color: var(--mc-grey);
    border: 3px solid var(--mc-outline);
    border-top-color: var(--mc-highlight);
    border-left-color: var(--mc-highlight);
    border-right-color: var(--mc-shadow);
    border-bottom-color: var(--mc-shadow);
    color: #404040;
    padding: 5px 15px;
    font-size: 18px;
    font-family: 'VT323', monospace;
    cursor: pointer;
    flex: 1;
}

.overlay-btn:hover {
    background-color: #e0e0e0;
}

.overlay-btn.active {
    background-color: var(--mc-button-hover);
    border-color: #55ff55;
    color: #000;
}


.color-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.color-swatch {
    width: 36px;
    height: 36px;
    border: 3px solid var(--mc-outline);
    border-top-color: var(--mc-highlight);
    border-left-color: var(--mc-highlight);
    border-right-color: var(--mc-shadow);
    border-bottom-color: var(--mc-shadow);
    cursor: pointer;
    transition: transform 0.1s;
}

.color-swatch:hover {
    transform: scale(1.1);
    border-color: var(--mc-highlight);
}

.color-swatch.active {
    border: 3px solid #55ff55 !important;
    transform: scale(1.1);
}

.hidden {
    display: none !important;
}

/* Main Layout Flex */
.main-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    justify-content: center;
    margin-bottom: 40px;
}

/* Sample Section Styles */
.sample-section {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sample-card {
    background-color: var(--mc-grey);
    border: 4px solid var(--mc-outline);
    border-top-color: var(--mc-highlight);
    border-left-color: var(--mc-highlight);
    border-right-color: var(--mc-shadow);
    border-bottom-color: var(--mc-shadow);
    padding: 20px;
    width: 260px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.sample-card h3 {
    color: #404040;
    font-size: 20px;
    margin: 0 0 15px 0;
    text-transform: uppercase;
}

.sample-image-wrapper {
    background-color: #1a1a1a;
    border: 3px solid var(--mc-shadow);
    padding: 5px;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sample-image {
    max-width: 100%;
    height: auto;
    image-rendering: pixelated;
    /* Maintain Minecraft look */
}

.sample-caption {
    color: #555;
    font-size: 16px;
    margin: 0;
    font-style: italic;
}

.license-info {
    margin-top: 20px;
    text-align: center;
    color: var(--mc-grey);
    font-size: 14px;
    line-height: 1.5;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid var(--mc-dark-grey);
    padding: 10px;
    width: 260px;
    box-sizing: border-box;
}

.license-info p {
    margin: 2px 0;
}

.privacy-note {
    font-size: 18px;
    color: var(--mc-highlight);
    margin-top: 10px !important;
}

/* Responsive Layout */
@media (max-width: 800px) {
    .main-layout {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .sample-card {
        width: auto;
        max-width: 300px;
    }

    .tool-section {
        width: 100%;
    }
}