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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #0d0d0d;
    color: #e8e8e8;
    overflow-x: hidden;
    line-height: 1.6;
}

#particles {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1;
pointer-events: none;
opacity: 0.6;
}

.container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 30px;
}

header {
    text-align: center;
    margin-bottom: 60px;
}

h1 {
    font-size: 2.8em;
    font-weight: 600;
    letter-spacing: 3px;
    margin-bottom: 12px;
    color: #fff;
}

.subtitle {
    color: #888;
    font-size: 1em;
    font-weight: 300;
}

.upload-zone {
    background: rgba(25, 25, 25, 0.6);
    border: 2px dashed #404040;
    border-radius: 16px;
    padding: 80px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 40px;
    backdrop-filter: blur(10px);
}

.upload-zone:hover {
    border-color: #606060;
    background: rgba(30, 30, 30, 0.7);
    transform: translateY(-2px);
}

.upload-zone.dragging {
    border-color: #5a9fd4;
    background: rgba(90, 159, 212, 0.1);
}

.upload-icon {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.5;
    font-weight: 200;
}

.upload-zone h3 {
    font-weight: 400;
    margin-bottom: 8px;
}

input[type="file"] {
    display: none;
}

.editor-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.editor-section.active {
    display: block;
}

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

.file-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.info-card {
    background: rgba(25, 25, 25, 0.6);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #5a9fd4;
    backdrop-filter: blur(10px);
}

.info-label {
    font-size: 0.85em;
    color: #999;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-value {
    font-size: 1.2em;
    font-weight: 500;
    color: #fff;
}

.modification-section {
    background: rgba(20, 20, 20, 0.6);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 40px;
    backdrop-filter: blur(10px);
}

.mod-group {
    margin-bottom: 35px;
    padding-bottom: 35px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mod-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.mod-group h4 {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: #5a9fd4;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.input-row {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.input-group {
    flex: 1;
    min-width: 150px;
}

label {
    display: block;
    font-size: 0.9em;
    color: #aaa;
    margin-bottom: 8px;
    font-weight: 400;
}

input[type="number"],
input[type="text"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #404040;
    color: #e8e8e8;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
}

input[type="number"]:focus,
input[type="text"]:focus {
    outline: none;
    border-color: #5a9fd4;
    background: rgba(0, 0, 0, 0.6);
}

button {
    background: #5a9fd4;
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    transition: all 0.3s ease;
    font-weight: 500;
    white-space: nowrap;
}

button:hover {
    background: #4a8fc4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(90, 159, 212, 0.3);
}

button:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(60, 60, 60, 0.6);
}

.btn-secondary:hover {
    background: rgba(70, 70, 70, 0.8);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.manual-edit {
    background: rgba(30, 30, 30, 0.6);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
    backdrop-filter: blur(10px);
}

.edit-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.edit-info {
    font-size: 0.9em;
    color: #888;
    font-style: italic;
}

.hex-viewer {
    background: #000;
    border-radius: 12px;
    padding: 25px;
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 0.9em;
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 30px;
    border: 1px solid #202020;
}

.hex-viewer::-webkit-scrollbar {
    width: 10px;
}

.hex-viewer::-webkit-scrollbar-track {
    background: #0a0a0a;
}

.hex-viewer::-webkit-scrollbar-thumb {
    background: #404040;
    border-radius: 5px;
}

.hex-viewer::-webkit-scrollbar-thumb:hover {
    background: #505050;
}

.hex-row {
    display: flex;
    margin-bottom: 3px;
    line-height: 1.8;
}

.hex-offset {
    color: #666;
    margin-right: 25px;
    user-select: none;
    min-width: 80px;
}

.hex-bytes {
    flex: 1;
    letter-spacing: 2px;
}

.hex-byte {
    display: inline-block;
    width: 30px;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.hex-byte:hover {
    background: rgba(90, 159, 212, 0.3);
    color: #fff;
}

.hex-byte.selected {
    background: rgba(90, 159, 212, 0.5);
    color: #fff;
}

.action-bar {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
}

.warning {
    background: rgba(180, 60, 60, 0.15);
    border-left: 4px solid #d44444;
    padding: 18px 22px;
    border-radius: 8px;
    margin-bottom: 30px;
    font-size: 0.95em;
    color: #ff9999;
}

h3 {
    margin-bottom: 20px;
    font-weight: 500;
    letter-spacing: 1px;
    font-size: 1.3em;
    color: #fff;
}

@media (max-width: 768px) {
    .container {
        padding: 40px 20px;
    }

    .input-row {
        flex-direction: column;
    }

    h1 {
        font-size: 2em;
    }

    .modification-section {
        padding: 25px;
    }

    .action-bar {
        flex-direction: column;
    }

    button {
        width: 100%;
    }
}
