body {
    font-family: 'Segoe UI', Roboto, sans-serif;
    padding: 20px;
    background-color: #110344;
    line-height: 1.6;
    color: #ffffff;
}

.links {
    display: flex;
    gap: 16px;
    flex-direction: column;
    color: white;
}

.links a {
    color: white;
}

.links a:hover {
    color: #9f6eff;
}

.card {
    width: 258px;
    height: 396px;
}

.player-stats {
    width: 270px;
    height: 480px;
}

.magic-roll {
    width: 292px;
    height: 634px;
}

.stats {
    max-width: 90vw;
    max-height: 60vh;
    width: auto;
    height: auto;
    aspect-ratio: 1600/1080;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    object-fit: contain;
}

h1 {
    color: #ffffff;
}

label {
    display: block;
    margin-bottom: 2px;
}

input,
select {
    width: 100%;
    box-sizing: border-box;
    padding: 8px;
    border: 2px solid #2a1f5d;
    border-radius: 8px;
    transition: border-color 0.3s ease;
    margin-bottom: 6px;
}

input:focus,
select:focus {
    outline: none;
    border-color: #9f6eff;
}

button {
    padding: 8px 16px;
    background-color: #9f6eff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

button:hover {
    background-color: #8656ff;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(159, 110, 255, 0.2);
}

.container {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    padding: 1rem;
    max-width: 1800px;
    margin: 0 auto;
    background-color: #1a0f4d;
    border-radius: 16px;
    box-shadow: 0 2px 4px rgba(159, 110, 255, 0.2);
    align-items: flex-start;
    justify-content: center;
    width: fit-content;
    min-width: 1024px;
    padding: 2rem;
    flex-wrap: wrap;
}

.form-section {
    max-width: 600px;
    flex-shrink: 0;
}

.image-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: auto;
    flex-shrink: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
}

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

.form-group label {
    display: block;
    margin-bottom: 2px;
    font-size: 0.9em;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 6px;
    margin-bottom: 0;
}

.full-width {
    grid-column: 1 / -1;
}

button[type='submit'] {
    grid-column: 1 / -1;
    width: 200px;
    margin: 10px auto 0;
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 5px;
    align-items: center;
}

.radio-group input[type='radio'] {
    width: auto;
    margin: 0;
    padding: 0;
    width: 16px;
    height: 16px;
}

.radio-group label {
    margin: 0;
    margin-left: 5px;
    display: inline;
}

@media (max-width: 1200px) {
    .container {
        max-width: 95%;
        padding: 0.5rem;
    }

    .stats {
        max-width: 95vw;
        max-height: 65vh;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        gap: 1rem;
    }

    .form-section,
    .image-section {
        width: 100%;
        max-width: none;
    }

    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats {
        max-width: 95vw;
        max-height: 50vh;
    }

    body {
        padding: 10px;
    }
}

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

    .radio-group {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .radio-group input[type='radio'] {
        margin-right: 5px;
    }

    .stats {
        max-width: 98vw;
        max-height: 45vh;
    }
}
