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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: 
        radial-gradient(circle at 20% 50%, rgba(79, 195, 247, 0.15) 0%, transparent 60%),
        radial-gradient(circle at 80% 80%, rgba(156, 39, 176, 0.15) 0%, transparent 60%),
        radial-gradient(circle at 50% 20%, rgba(129, 199, 132, 0.08) 0%, transparent 50%),
        linear-gradient(135deg, #0a1929 0%, #1a2f4a 50%, #0f1e2e 100%);
    background-attachment: fixed;
    color: #e0e0e0;
    min-height: 100vh;
    padding: 10px;
    line-height: 1.5;
    overflow-x: auto;
    position: relative;
}

.credit-text {
    position: fixed;
    top: 10px;
    left: 10px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-weight: 400;
    z-index: 1000;
    pointer-events: none;
}

.corner-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.corner-btn {
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.15) 0%, rgba(79, 195, 247, 0.25) 100%);
    border: 2px solid rgba(79, 195, 247, 0.5);
    border-radius: 8px;
    padding: 12px 20px;
    color: #4fc3f7;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    min-width: 150px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(79, 195, 247, 0.2);
}

.corner-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 195, 247, 0.4) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1), height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.corner-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.corner-btn:hover::before {
    width: 400px;
    height: 400px;
}

.corner-btn:hover::after {
    left: 100%;
}

.corner-btn:hover {
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.25) 0%, rgba(79, 195, 247, 0.35) 100%);
    box-shadow: 
        0 8px 32px rgba(79, 195, 247, 0.4),
        0 0 60px rgba(79, 195, 247, 0.3),
        inset 0 0 30px rgba(79, 195, 247, 0.15);
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(129, 199, 132, 0.8);
}

.corner-btn:active {
    transform: translateY(-2px) scale(0.98);
    box-shadow: 
        0 4px 16px rgba(79, 195, 247, 0.3),
        inset 0 0 20px rgba(79, 195, 247, 0.2);
}

.corner-btn > * {
    position: relative;
    z-index: 1;
}

.container {
    width: 1800px;
    max-width: 1800px;
    margin: 0 auto;
    min-width: 1800px;
}

header {
    margin-bottom: 20px;
    padding: 20px 0;
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(79, 195, 247, 0.5), transparent);
}

header h1 {
    font-size: 2em;
    margin-bottom: 15px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

header h1 span {
    color: #4fc3f7;
    text-shadow: 
        0 0 20px rgba(79, 195, 247, 0.5),
        0 2px 8px rgba(0, 0, 0, 0.4),
        0 4px 12px rgba(79, 195, 247, 0.3);
    font-weight: 700;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #4fc3f7 0%, #81c784 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

.header-logo {
    max-width: 60px;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(79, 195, 247, 0.4));
    transition: all 0.3s ease;
    vertical-align: middle;
}

.header-logo:hover {
    filter: drop-shadow(0 0 25px rgba(79, 195, 247, 0.6));
    transform: scale(1.1);
}

@keyframes titleGlow {
    0% {
        filter: drop-shadow(0 0 10px rgba(79, 195, 247, 0.5));
    }
    100% {
        filter: drop-shadow(0 0 20px rgba(79, 195, 247, 0.8));
    }
}

.warning-banner {
    background: linear-gradient(135deg, #7b1fa2 0%, #9c27b0 100%);
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 15px;
    font-size: 0.9em;
}

.main-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 15px;
    align-items: start;
}

.left-column,
.right-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stats-color-container {
    display: grid;
    grid-template-columns: minmax(0, 350px) 1fr minmax(0, 350px);
    gap: 15px;
    align-items: start;
}

.stats-color-container .section:first-child {
    max-width: 350px;
    width: 100%;
}

.stats-color-container .section:nth-child(2) {
    /* Color Picker */
    max-width: 700px;
    min-width: 0;
    width: 100%;
    height: 100%;
}

.stats-color-container .section:last-child {
    max-width: 350px;
    width: 100%;
}

.colors-presets-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    align-items: start;
}

.colors-presets-container .section:first-child {
    margin-right: 0;
}

.colors-presets-container .section:last-child {
    margin-left: 0;
}

.colors-presets-container .section:first-child {
    max-width: 350px;
    width: 100%;
}

.colors-presets-container .section:last-child {
    max-width: 350px;
    width: 100%;
}

.section {
    background: linear-gradient(135deg, rgba(26, 47, 74, 0.85) 0%, rgba(15, 30, 45, 0.9) 100%);
    border: 1px solid rgba(79, 195, 247, 0.2);
    background-clip: padding-box;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(79, 195, 247, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    width: 100%;
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(79, 195, 247, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.section:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(79, 195, 247, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 60px rgba(79, 195, 247, 0.15);
    border-color: rgba(79, 195, 247, 0.4);
}

.section:hover::before {
    opacity: 1;
}

/* Stats Section*/
.section:has(.stats-table) {
    max-width: 350px;
}

/* Colors Section*/
.section:has(.color-regions) {
    max-width: 350px;
}

/* Color Picker */
.color-picker-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.color-search-box {
    position: relative;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(15, 30, 45, 0.98) 0%, rgba(26, 47, 74, 0.95) 100%);
    border: 1px solid rgba(79, 195, 247, 0.4);
    border-radius: 12px;
    margin-top: 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    backdrop-filter: blur(20px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(79, 195, 247, 0.2),
        0 0 60px rgba(79, 195, 247, 0.2);
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.color-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(79, 195, 247, 0.15);
    position: relative;
}

.color-result-item:last-child {
    border-bottom: none;
}

.color-result-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #4fc3f7, #81c784);
    opacity: 0;
    transition: opacity 0.3s;
}

.color-result-item:hover {
    background: linear-gradient(90deg, rgba(79, 195, 247, 0.2) 0%, rgba(79, 195, 247, 0.1) 100%);
    padding-left: 20px;
    transform: translateX(4px);
}

.color-result-item:hover::before {
    opacity: 1;
}

.result-swatch {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-swatch:hover {
    transform: scale(1.1);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(79, 195, 247, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.result-info {
    flex: 1;
}

.result-name {
    font-size: 14px;
    font-weight: 500;
    color: #e0e0e0;
    margin-bottom: 4px;
}

.result-id {
    font-size: 12px;
    color: #b0bec5;
    font-family: 'Courier New', monospace;
}

.color-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(15, 30, 45, 0.8);
    border-radius: 8px;
    border: 2px solid rgba(79, 195, 247, 0.3);
}

.color-preview {
    width: 90px;
    height: 90px;
    border-radius: 12px;
    border: 3px solid rgba(79, 195, 247, 0.6);
    background: #000;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(79, 195, 247, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.color-preview::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(180deg);
    }
}

.color-preview:hover {
    transform: scale(1.05);
    box-shadow: 
        0 6px 24px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(79, 195, 247, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(129, 199, 132, 0.8);
}

.color-details {
    flex: 1;
}

.color-name {
    font-size: 17px;
    font-weight: 700;
    color: #4fc3f7;
    margin-bottom: 6px;
    text-shadow: 0 0 15px rgba(79, 195, 247, 0.5);
    letter-spacing: 0.3px;
}

.color-id {
    font-size: 14px;
    color: #81c784;
    font-family: 'Courier New', 'Consolas', monospace;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(129, 199, 132, 0.3);
}

.color-hex {
    font-size: 12px;
    color: #81c784;
    font-family: 'Courier New', 'Consolas', monospace;
    margin-top: 5px;
    text-shadow: 0 0 8px rgba(129, 199, 132, 0.3);
    font-weight: 600;
}

.region-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.region-buttons-label {
    font-size: 13px;
    color: #b0bec5;
    font-weight: 500;
}

.region-buttons {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
}

.region-btn {
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.2) 0%, rgba(79, 195, 247, 0.3) 100%);
    border: 2px solid rgba(79, 195, 247, 0.6);
    border-radius: 8px;
    padding: 10px 14px;
    color: #4fc3f7;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 50px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(79, 195, 247, 0.2);
    position: relative;
    overflow: hidden;
}

.region-btn::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.4s;
}

.region-btn:hover::before {
    left: 100%;
}

.region-btn:hover {
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.3) 0%, rgba(79, 195, 247, 0.4) 100%);
    box-shadow: 
        0 4px 16px rgba(79, 195, 247, 0.5),
        0 0 25px rgba(79, 195, 247, 0.4),
        inset 0 0 15px rgba(79, 195, 247, 0.2);
    transform: translateY(-3px) scale(1.05);
    border-color: rgba(129, 199, 132, 0.9);
}

.region-btn:active {
    transform: translateY(-1px) scale(0.97);
    box-shadow: 
        0 2px 8px rgba(79, 195, 247, 0.4),
        inset 0 0 10px rgba(79, 195, 247, 0.2);
}

/* Level Calculator */
.level-calculator-compact {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.level-display-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: rgba(79, 195, 247, 0.1);
    border: 2px solid rgba(79, 195, 247, 0.3);
    border-radius: 6px;
}

.level-label-compact {
    font-size: 15px;
    color: #b0bec5;
    font-weight: 500;
}

.level-value-compact {
    font-size: 30px;
    font-weight: 700;
    color: #4fc3f7;
    text-shadow: 0 0 8px rgba(79, 195, 247, 0.5);
}

.level-breakdown-compact {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 20px;
}

.level-stat-compact {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid rgba(79, 195, 247, 0.1);
}

.level-stat-compact:last-child {
    border-bottom: none;
}

.level-stat-compact span:first-child {
    color: #b0bec5;
}

.level-stat-compact span:last-child {
    color: #4fc3f7;
    font-weight: 600;
}

.section:has(.level-calculator-compact) {
    max-width: 350px;
}

/* Stat Presets Styles */
.stat-presets {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.preset-btn {
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.15) 0%, rgba(79, 195, 247, 0.25) 100%);
    border: 2px solid rgba(79, 195, 247, 0.5);
    border-radius: 8px;
    padding: 10px 14px;
    color: #4fc3f7;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(79, 195, 247, 0.2);
}

.preset-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 195, 247, 0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1), height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.preset-btn:hover::before {
    width: 200px;
    height: 200px;
}

.preset-btn:hover {
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.25) 0%, rgba(79, 195, 247, 0.35) 100%);
    box-shadow: 
        0 4px 16px rgba(79, 195, 247, 0.4),
        0 0 30px rgba(79, 195, 247, 0.3),
        inset 0 0 20px rgba(79, 195, 247, 0.15);
    transform: translateY(-3px) scale(1.05);
    border-color: rgba(129, 199, 132, 0.8);
}

.preset-btn:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 
        0 2px 8px rgba(79, 195, 247, 0.3),
        inset 0 0 15px rgba(79, 195, 247, 0.2);
}

.preset-btn > * {
    position: relative;
    z-index: 1;
}

.preset-btn[data-preset="reset"] {
    border-color: rgba(244, 67, 54, 0.4);
    color: #f44336;
    background: rgba(244, 67, 54, 0.1);
}

.preset-btn[data-preset="reset"]:hover {
    background: rgba(244, 67, 54, 0.2);
    box-shadow: 0 0 12px rgba(244, 67, 54, 0.4);
    border-color: #f44336;
}


.section > * {
    position: relative;
    z-index: 1;
}

.section::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.4), rgba(156, 39, 176, 0.4), rgba(79, 195, 247, 0.4));
    background-size: 200% 200%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    animation: gradientShift 3s ease infinite;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

.section:hover::before {
    opacity: 1;
    animation-duration: 1.5s;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.section h2 {
    color: #4fc3f7;
    font-size: 1.2em;
    margin-bottom: 12px;
    border-bottom: 2px solid rgba(79, 195, 247, 0.3);
    padding-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section h2 .panel-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(79, 195, 247, 0.6));
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.section:hover h2 .panel-icon {
    filter: drop-shadow(0 0 12px rgba(79, 195, 247, 0.9));
    transform: scale(1.1);
}

.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #b0bec5;
    font-weight: 500;
}

.select-input,
.text-input,
.number-input {
    width: 100%;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(15, 30, 45, 0.9) 0%, rgba(26, 47, 74, 0.8) 100%);
    border: 2px solid rgba(79, 195, 247, 0.3);
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.select-input:hover,
.text-input:hover,
.number-input:hover {
    border-color: rgba(79, 195, 247, 0.6);
    background: linear-gradient(135deg, rgba(15, 30, 45, 0.95) 0%, rgba(26, 47, 74, 0.9) 100%);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(79, 195, 247, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.select-input:focus,
.text-input:focus,
.number-input:focus {
    outline: none;
    border-color: #4fc3f7;
    background: linear-gradient(135deg, rgba(15, 30, 45, 1) 0%, rgba(26, 47, 74, 0.95) 100%);
    box-shadow: 
        0 0 0 3px rgba(79, 195, 247, 0.2),
        0 6px 20px rgba(79, 195, 247, 0.4),
        0 0 40px rgba(79, 195, 247, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #4fc3f7;
}

.input-hint {
    color: #78909c;
    font-size: 0.9em;
    margin-left: 10px;
}

/* Stats Table */
.stats-table {
    display: grid;
    grid-template-columns: auto repeat(2, 1fr);
    gap: 12px 8px;
    margin-top: 10px;
    width: 100%;
    box-sizing: border-box;
}

.stats-header {
    display: contents;
}

.stats-header .stat-cell {
    font-weight: 600;
    color: #4fc3f7;
    padding: 6px;
    text-align: center;
    border-bottom: 2px solid rgba(79, 195, 247, 0.3);
    font-size: 0.9em;
}

.stat-row {
    display: contents;
}

.stat-label {
    padding: 6px 4px 6px 0;
    color: #b0bec5;
    font-weight: 500;
    display: flex;
    align-items: center;
    font-size: 0.9em;
    white-space: nowrap;
    margin-right: 0;
    max-width: fit-content;
}

/* Input wrapper for mobile labels */
.input-wrapper {
    display: contents;
}

.input-label.mobile-label {
    display: none;
}

.stat-input {
    width: 100%;
    padding: 8px 10px;
    background: linear-gradient(135deg, rgba(15, 30, 45, 0.9) 0%, rgba(26, 47, 74, 0.8) 100%);
    border: 2px solid rgba(79, 195, 247, 0.3);
    border-radius: 8px;
    color: #e0e0e0;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    min-width: 0;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.stat-input:hover {
    border-color: rgba(79, 195, 247, 0.6);
    background: linear-gradient(135deg, rgba(15, 30, 45, 0.95) 0%, rgba(26, 47, 74, 0.9) 100%);
    box-shadow: 
        0 3px 10px rgba(0, 0, 0, 0.3),
        0 0 15px rgba(79, 195, 247, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.stat-input:focus {
    outline: none;
    border-color: #4fc3f7;
    background: linear-gradient(135deg, rgba(15, 30, 45, 1) 0%, rgba(26, 47, 74, 0.95) 100%);
    box-shadow: 
        0 0 0 3px rgba(79, 195, 247, 0.2),
        0 4px 15px rgba(79, 195, 247, 0.4),
        0 0 30px rgba(79, 195, 247, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.stat-input:hover {
    border-color: rgba(79, 195, 247, 0.6);
    box-shadow: 0 0 8px rgba(79, 195, 247, 0.3);
    background: rgba(15, 30, 45, 0.9);
}

.stat-input:focus {
    border-color: #4fc3f7;
    box-shadow: 0 0 12px rgba(79, 195, 247, 0.5);
    transform: scale(1.02);
}

.stat-input:focus {
    outline: none;
    border-color: #4fc3f7;
    box-shadow: 0 0 8px rgba(79, 195, 247, 0.4);
}


/* Color Regions */
.color-regions {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    column-gap: 10px;
    row-gap: 10px;
    margin-top: 10px;
    justify-content: start;
}

.color-region {
    display: flex;
    align-items: center;
    gap: 4px;
}

.color-region label {
    min-width: 60px;
    color: #b0bec5;
    font-weight: 500;
    font-size: 0.85em;
}

.color-input {
    width: 60px;
    padding: 4px 6px;
    background: rgba(15, 30, 45, 0.8);
    border: 2px solid rgba(79, 195, 247, 0.3);
    border-radius: 4px;
    color: #e0e0e0;
    text-align: center;
    font-size: 11px;
    transition: all 0.3s ease;
}

.color-input:hover {
    border-color: rgba(79, 195, 247, 0.6);
    box-shadow: 0 0 8px rgba(79, 195, 247, 0.3);
    background: rgba(15, 30, 45, 0.9);
}

.color-input:focus {
    border-color: #4fc3f7;
    box-shadow: 0 0 12px rgba(79, 195, 247, 0.5);
    transform: scale(1.05);
}

.color-input:focus {
    outline: none;
    border-color: #4fc3f7;
    box-shadow: 0 0 8px rgba(79, 195, 247, 0.4);
}

.color-regions:has(input:disabled) {
    opacity: 0.5;
}

.color-input:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Help Links */
.help-links {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.help-links a {
    color: #4fc3f7;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

.help-links a:hover {
    color: #81c784;
    text-decoration: underline;
}

/* Command Output */
.command-output {
    background: linear-gradient(135deg, rgba(10, 25, 41, 0.95) 0%, rgba(15, 30, 45, 0.9) 100%);
    border: 1px solid rgba(79, 195, 247, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin-top: 10px;
    width: 100%;
    max-width: 1400px;
    overflow: hidden;
    box-sizing: border-box;
    min-width: 0;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(79, 195, 247, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.command-output:hover {
    border-color: rgba(79, 195, 247, 0.5);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(79, 195, 247, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 60px rgba(79, 195, 247, 0.15);
    transform: translateY(-2px);
}

.command-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    gap: 15px;
}

.copy-btn {
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.2) 0%, rgba(79, 195, 247, 0.3) 100%);
    border: 2px solid rgba(79, 195, 247, 0.6);
    border-radius: 8px;
    padding: 10px 18px;
    color: #4fc3f7;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(79, 195, 247, 0.2);
}

.copy-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(79, 195, 247, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.copy-btn:hover::before {
    width: 300px;
    height: 300px;
}

.copy-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s;
}

.copy-btn:hover::after {
    left: 100%;
}

.copy-btn:hover {
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.3) 0%, rgba(79, 195, 247, 0.4) 100%);
    box-shadow: 
        0 6px 20px rgba(79, 195, 247, 0.5),
        0 0 40px rgba(79, 195, 247, 0.4),
        inset 0 0 20px rgba(79, 195, 247, 0.2);
    transform: translateY(-3px) scale(1.05);
    border-color: rgba(129, 199, 132, 0.9);
}

.copy-btn:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 
        0 3px 12px rgba(79, 195, 247, 0.4),
        inset 0 0 15px rgba(79, 195, 247, 0.2);
}

.copy-btn > * {
    position: relative;
    z-index: 1;
}

.copy-btn.copied {
    background: rgba(129, 199, 132, 0.2);
    border-color: #81c784;
    color: #81c784;
}

.command-text {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(10, 25, 41, 0.6) 100%);
    border-radius: 8px;
    padding: 12px 14px;
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 12px;
    color: #81c784;
    word-break: break-word;
    white-space: pre-wrap;
    line-height: 1.6;
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: block;
    border: 1px solid rgba(129, 199, 132, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 0 10px rgba(129, 199, 132, 0.4);
    font-weight: 500;
    letter-spacing: 0.3px;
    backdrop-filter: blur(5px);
    box-shadow: 
        inset 0 2px 8px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(129, 199, 132, 0.2);
    animation: commandPulse 3s ease-in-out infinite;
}

.command-text:hover {
    border-color: rgba(129, 199, 132, 0.6);
    box-shadow: 
        inset 0 2px 8px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(129, 199, 132, 0.4),
        0 0 50px rgba(129, 199, 132, 0.2);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(10, 25, 41, 0.7) 100%);
    text-shadow: 0 0 15px rgba(129, 199, 132, 0.6);
}

@keyframes commandPulse {
    0%, 100% {
        box-shadow: 
            inset 0 2px 8px rgba(0, 0, 0, 0.3),
            0 0 20px rgba(129, 199, 132, 0.2);
    }
    50% {
        box-shadow: 
            inset 0 2px 8px rgba(0, 0, 0, 0.4),
            0 0 30px rgba(129, 199, 132, 0.4),
            0 0 50px rgba(129, 199, 132, 0.3);
    }
}

.command-text.updating {
    animation: commandUpdate 0.5s ease;
}

@keyframes commandUpdate {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.02);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.command-text.single-line {
    white-space: nowrap;
    overflow-x: auto;
    max-width: 100%;
    box-sizing: border-box;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 30, 45, 0.5);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: rgba(79, 195, 247, 0.5);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(79, 195, 247, 0.7);
}

/* Responsive Design */
@media (max-width: 1600px) {
    .stats-color-container {
        grid-template-columns: minmax(0, 1fr) 1fr minmax(0, 1fr) !important;
    }
    
    .stats-color-container .section {
        max-width: 100% !important;
    }
}

@media (max-width: 1400px) {
    .container {
        max-width: 100% !important;
        padding: 0 10px;
    }
    
    .main-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .stats-color-container {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .stats-color-container .section {
        max-width: 100% !important;
        min-width: 0 !important;
        width: 100% !important;
    }
    
    .stats-color-container .section:first-child,
    .stats-color-container .section:nth-child(2),
    .stats-color-container .section:last-child {
        max-width: 100% !important;
        min-width: 0 !important;
        width: 100% !important;
    }
    
    .colors-presets-container {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .colors-presets-container .section:first-child,
    .colors-presets-container .section:last-child {
        margin-right: 0 !important;
        margin-left: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .section {
        max-width: 100% !important;
        width: 100% !important;
    }
}

@media (max-width: 1200px) {
    .container {
        max-width: 100% !important;
    }
    
    .stats-color-container {
        grid-template-columns: 1fr !important;
    }
    
    .stats-color-container .section {
        max-width: 100% !important;
        min-width: 0 !important;
        width: 100% !important;
    }
    
    .stats-color-container .section:first-child,
    .stats-color-container .section:nth-child(2),
    .stats-color-container .section:last-child {
        max-width: 100% !important;
        min-width: 0 !important;
        width: 100% !important;
    }
    
    .colors-presets-container {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .colors-presets-container .section:first-child,
    .colors-presets-container .section:last-child {
        margin-right: 0 !important;
        margin-left: 0 !important;
        max-width: 100% !important;
    }
}

@media (max-width: 768px) {
    body {
        padding: 8px;
        overflow-x: hidden;
    }
    
    .container {
        max-width: 100%;
        margin: 0;
    }
    
    header {
        margin-bottom: 12px;
    }
    
    header h1 {
        font-size: 1.2em;
        margin-bottom: 8px;
        line-height: 1.3;
        gap: 8px;
    }
    
    .header-logo {
        max-width: 40px;
        max-height: 40px;
    }
    
    .credit-text {
        font-size: 9px;
        top: 5px;
        left: 5px;
    }
    
    .main-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
        display: flex;
        flex-direction: column;
    }
    
    .left-column,
    .right-column {
        gap: 12px;
        width: 100%;
        display: flex;
        flex-direction: column;
    }
    
    .section {
        padding: 15px;
        margin-bottom: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .section h2 {
        font-size: 1.1em;
        margin-bottom: 12px;
        font-weight: 600;
    }
    
    /* Stats and Color Container - Stack vertically in logical order */
    .stats-color-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        width: 100%;
    }
    
    .stats-color-container .section {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        order: 0;
    }
    
    /* Set Stat Levels first */
    .stats-color-container .section:first-child {
        order: 1;
    }
    
    /* Color Picker second */
    .stats-color-container .section:nth-child(2) {
        order: 2;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Level Calculator third */
    .stats-color-container .section:last-child {
        order: 3;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Colors and Presets Container - Stack vertically */
    .colors-presets-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        width: 100%;
    }
    
    .colors-presets-container .section {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
    
    /* Stats Table - Better mobile layout */
    .stats-table {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .stats-header {
        display: none;
    }

    .stat-row {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 8px;
        padding: 12px;
        background: linear-gradient(135deg, rgba(15, 30, 45, 0.7) 0%, rgba(26, 47, 74, 0.6) 100%);
        border-radius: 10px;
        border: 1px solid rgba(79, 195, 247, 0.3);
        align-items: start;
        backdrop-filter: blur(10px);
        box-shadow: 
            0 2px 8px rgba(0, 0, 0, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .stat-row:hover {
        background: linear-gradient(135deg, rgba(15, 30, 45, 0.8) 0%, rgba(26, 47, 74, 0.7) 100%);
        border-color: rgba(79, 195, 247, 0.5);
        box-shadow: 
            0 4px 12px rgba(0, 0, 0, 0.3),
            0 0 20px rgba(79, 195, 247, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.08);
        transform: translateY(-1px);
    }

    .stat-label {
        font-weight: 600;
        color: #4fc3f7;
        font-size: 0.95em;
        text-shadow: 0 0 10px rgba(79, 195, 247, 0.3);
        grid-column: 1;
        display: flex;
        align-items: center;
    }

    .input-wrapper {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .input-wrapper:nth-child(2) {
        grid-column: 2;
    }

    .input-wrapper:nth-child(3) {
        grid-column: 3;
    }

    .input-label.mobile-label {
        display: block;
        font-size: 0.7em;
        font-weight: 700;
        letter-spacing: 0.5px;
        pointer-events: none;
        margin-bottom: 2px;
    }

    .input-label.wild-label {
        color: #4fc3f7;
        text-shadow: 0 0 10px rgba(79, 195, 247, 0.5);
    }

    .input-label.tamed-label {
        color: #81c784;
        text-shadow: 0 0 10px rgba(129, 199, 132, 0.5);
    }

    .stat-input {
        width: 100%;
        padding: 10px;
        font-size: 1em;
        box-sizing: border-box;
    }
    
    .stat-input.wild {
        grid-column: auto;
    }
    
    .stat-input.tamed {
        grid-column: auto;
    }
    
    /* Color Regions - Better spacing */
    .color-regions {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .color-region {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
    
    .color-region label {
        font-size: 0.9em;
        font-weight: 500;
    }
    
    .color-region input {
        width: 100%;
        padding: 8px;
    }
    
    /* Buttons - Full width, better spacing */
    .corner-buttons {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        width: 100%;
    }
    
    .corner-btn {
        padding: 12px 16px;
        font-size: 14px;
        width: 100%;
        min-width: 0;
        text-align: center;
    }
    
    /* Form elements */
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-group label {
        font-size: 0.95em;
        margin-bottom: 6px;
        display: block;
        font-weight: 500;
    }
    
    .text-input,
    .select-input,
    .number-input {
        width: 100%;
        padding: 10px;
        font-size: 1em;
        box-sizing: border-box;
    }
    
    /* Command output */
    .command-output {
        padding: 12px;
        flex-direction: column;
        gap: 10px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .command-text {
        font-size: 0.8em;
        word-break: break-all;
        line-height: 1.4;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Stat Presets - 2 columns on mobile */
    .stat-presets {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .preset-btn {
        padding: 10px 12px;
        font-size: 0.9em;
        width: 100%;
    }
    
    /* Color Picker */
    .color-picker-container {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .color-search-box {
        width: 100%;
    }
    
    .color-search-box input {
        width: 100%;
        font-size: 1em;
        padding: 10px;
        box-sizing: border-box;
    }
    
    .region-buttons {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .region-btn {
        padding: 8px;
        font-size: 0.9em;
    }
    
    /* Level Calculator */
    .level-calculator-compact {
        padding: 12px;
    }
    
    .level-label-compact,
    .level-stat-compact {
        font-size: 0.95em;
    }
    
    /* Generated Command Section - Make it prominent */
    .section:has(.command-output) {
        order: 999;
    }
}

@media (max-width: 480px) {
    body {
        padding: 6px;
    }
    
    header h1 {
        font-size: 1.1em;
        line-height: 1.2;
        gap: 6px;
    }
    
    .header-logo {
        max-width: 30px;
        max-height: 30px;
    }
    
    .section {
        padding: 12px;
    }
    
    .section h2 {
        font-size: 1em;
        margin-bottom: 10px;
    }
    
    .stat-row {
        grid-template-columns: 1fr 1fr 1fr;
        padding: 10px;
        gap: 6px;
    }
    
    .stat-label {
        font-size: 0.9em;
        grid-column: 1;
    }

    .input-wrapper {
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

    .input-wrapper:nth-child(2) {
        grid-column: 2;
    }

    .input-wrapper:nth-child(3) {
        grid-column: 3;
    }

    .input-label.mobile-label {
        display: block;
        font-size: 0.65em;
        font-weight: 700;
        letter-spacing: 0.5px;
    }

    .input-label.wild-label {
        color: #4fc3f7;
        text-shadow: 0 0 8px rgba(79, 195, 247, 0.5);
    }

    .input-label.tamed-label {
        color: #81c784;
        text-shadow: 0 0 8px rgba(129, 199, 132, 0.5);
    }
    
    .stat-input {
        padding: 8px;
        font-size: 0.95em;
    }
    
    .stat-input.wild {
        grid-column: auto;
    }
    
    .stat-input.tamed {
        grid-column: auto;
    }
    
    .color-regions {
        grid-template-columns: 1fr;
    }
    
    .corner-btn {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .stat-presets {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .preset-btn {
        padding: 10px;
        font-size: 0.85em;
    }
    
    .region-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .command-text {
        font-size: 0.75em;
        line-height: 1.3;
    }
    
    .form-group {
        margin-bottom: 10px;
    }
    
    .text-input,
    .select-input,
    .number-input {
        padding: 8px;
        font-size: 0.95em;
    }
}

