* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(180deg, #000033 0%, #000066 50%, #000033 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    position: relative;
    padding: 20px;
    user-select: none;
}

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

.planet {
    position: absolute;
    border-radius: 50%;
    transition: all 0.5s ease;
    z-index: 1;
    object-fit: cover;
}

.planet-purple {
    width: 350px;
    height: 350px;
    top: 50px;
    left: 10px;
    animation: float 6s ease-in-out infinite;
}

.planet-earth {
    width: 180px;
    height: 180px;
    top: 60px;
    right: 120px;
    animation: float 8s ease-in-out infinite;
}

.planet-small {
    width: 80px;
    height: 80px;
    bottom: 180px;
    right: 150px;
    animation: float 5s ease-in-out infinite;
}

.planet-tiny {
    width: 150px;
    height: 150px;
    bottom: 120px;
    left: 80px;
    animation: float 7s ease-in-out infinite;
}

.container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 40px;
    width: 100%;
    max-width: 900px;
    box-shadow: 0 10px 60px rgba(0, 0, 0, 0.3);
    z-index: 10;
    color: white;
}

.header-auth {
    text-align: right;
    margin-bottom: 20px;
}

.logo {
    text-align: center;
    margin-bottom: 20px;
}

.logo img {
    max-width: 100px;
    height: auto;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

h1 {
    text-align: center;
    color: white;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.content-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 30px;
    flex-direction: column;
}

.upload-box-wrapper {
    width: 100%;
    max-width: 400px;
}

.upload-zone {
    border: 3px dashed rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 50px 20px;
    text-align: center;
    background: rgba(0, 0, 30, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0;
    box-shadow: 0 0 20px rgba(74, 139, 194, 0.2);
}

.upload-zone:hover {
    border-color: #8b5cf6;
    background: rgba(0, 0, 50, 0.7);
}

.upload-zone.dragover {
    border-color: #8b5cf6;
    background: rgba(0, 0, 70, 0.8);
    transform: scale(1.02);
}

.upload-icon-new {
    font-size: 4rem;
    margin-bottom: 15px;
    line-height: 1;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.upload-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    text-align: center;
}

.upload-text a {
    color: #b366ff;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
}

.character-wrapper {
    width: 250px;
    display: block;
    justify-content: center;
    margin-top: 30px;
}

.character-wrapper.external-left {
    position: absolute;
    right: 15%;
    top: 50%;
    transform: translateY(-50%) scale(0.8);
    z-index: 5;
    width: 250px;
}

.character {
    position: relative;
    width: 280px;
    animation: float 4s ease-in-out infinite;
    transform: scale(0.8);
}

.character-image {
    width: 400px;
    height: 400px;
    display: block;
    position: relative;
    margin: 0 auto;
    object-fit: contain;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
        transform: translateX(-50%) scale(1);
    }

    50% {
        opacity: 0.8;
        transform: translateX(-50%) scale(1.1);
    }
}

.file-list {
    margin: 15px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.file-list.show {
    display: block;
}

.file-item {
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    margin-bottom: 8px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.file-item:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: none;
}

.remove-file {
    color: #ff6b9d;
    cursor: pointer;
    font-weight: bold;
    font-size: 24px;
    transition: color 0.2s ease;
}

.remove-file:hover {
    color: #ff3377;
}

.options-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 30px 0 20px 0;
    cursor: pointer;
    user-select: none;
    padding: 12px;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.options-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.2);
    position: relative;
}

.checkbox.checked {
    background: linear-gradient(135deg, #8b5cf6, #b366ff);
    border-color: #8b5cf6;
}

.checkbox.checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 18px;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.options-label {
    color: white;
    font-weight: 500;
}

.additional-options {
    background: linear-gradient(145deg, #000033, #000044);
    border-radius: 15px;
    padding: 0;
    margin-bottom: 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.additional-options.show {
    max-height: 1200px;
    padding: 30px;
    opacity: 1;
    margin-top: 10px;
}

.options-header {
    color: #b366ff;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(179, 102, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
}

.options-header::before {
    content: '⚙';
    font-size: 22px;
    color: #b366ff;
}

.form-group {
    margin-bottom: 20px;
    animation: slideIn 0.4s ease forwards;
    opacity: 0;
    background: none !important;
}

.form-group:nth-of-type(1) {
    animation-delay: 0.05s;
}

.form-group:nth-of-type(2) {
    animation-delay: 0.10s;
}

.form-group:nth-of-type(3) {
    animation-delay: 0.15s;
}

.form-group:nth-of-type(4) {
    animation-delay: 0.20s;
}

.form-group:nth-of-type(5) {
    animation-delay: 0.25s;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-label::before {
    content: '';
    width: 4px;
    height: 16px;
    background: #b366ff;
    border-radius: 2px;
}

.form-input {
    width: 100%;
    padding: 14px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #b366ff;
    box-shadow: 0 0 0 3px rgba(179, 102, 255, 0.3);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.upload-button {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #4da6ff, #6b4de8);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(77, 166, 255, 0.5);
}

.upload-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(77, 166, 255, 0.7);
}

.upload-button:active {
    transform: translateY(0);
}

.file-input {
    display: none;
}

.link-display {
    text-align: center;
    padding: 20px;
    background: rgba(179, 102, 255, 0.1);
    border: 1px solid #b366ff;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 10px rgba(179, 102, 255, 0.3);
}

.link-display h2 {
    font-size: 24px;
    color: #2ecc71;
    margin-bottom: 10px;
}

.link-display p {
    font-size: 16px;
    color: white;
    margin-bottom: 15px;
}

.link-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px;
    gap: 10px;
}

.link-box a {
    flex-grow: 1;
    font-size: 14px;
    color: #4da6ff;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
    font-weight: 500;
}

.copy-button {
    padding: 8px 15px;
    background: #2ecc71;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.copy-button:hover {
    background: #27ae60;
}

.custom-dropdown {
    position: relative;
    width: 100%;
    cursor: pointer;
}

.dropdown-header {
    background: rgba(255, 255, 255, 0.1);
    padding: 14px;
    border-radius: 8px;
    font-size: 14px;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.custom-dropdown.active .dropdown-header {
    border-color: #b366ff;
    box-shadow: 0 0 0 3px rgba(179, 102, 255, 0.3);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.arrow-icon {
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.custom-dropdown.active .arrow-icon {
    transform: rotate(180deg);
}

.dropdown-list {
    background: #000055;
    border-radius: 0 0 8px 8px;
    border-top: none;
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    padding: 0;
    border-top: none;
}

.custom-dropdown.active .dropdown-list {
    max-height: 250px;
}

.dropdown-list li {
    padding: 12px 14px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown-list li:hover {
    background: #000077;
    color: #b366ff;
}

.dropdown-list li.selected {
    background: #b366ff;
    color: white;
}

.header-auth a,
.header-auth button {
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    margin-left: 10px;
    display: inline-block;
    transition: background-color 0.2s;
    border: 2px solid transparent;
    cursor: pointer;
}

.header-auth .auth-link {
    color: #4da6ff;
    border-color: #4da6ff;
    background: rgba(77, 166, 255, 0.1);
}

.header-auth .auth-link:hover {
    background-color: rgba(77, 166, 255, 0.2);
}

.header-auth .dashboard-link {
    background-color: #2ecc71;
    color: white;
}

.header-auth .dashboard-link:hover {
    background-color: #27ae60;
}

.header-auth .logout-button {
    background-color: #ff6b9d;
    color: white;
}

.header-auth .logout-button:hover {
    background-color: #c1406a;
}

.ad-banner {
    display: flex;
    justify-content: center;
}

.ad-banner img {
    max-width: 100%;
    height: auto;
}

@media (min-width: 900px) {
    .content-wrapper {
        flex-direction: row;
    }

    .upload-box-wrapper {
        width: 100%;
    }
}

@media (min-width: 600px) {
    .character-wrapper {
        display: block;
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 24px;
        max-width: 95%;
    }

    h1 {
        font-size: 2.5rem;
    }

    .planet-purple,
    .planet-earth,
    .planet-small,
    .planet-tiny {
        transform: scale(0.5);
        opacity: 0.5;
    }

    .character-wrapper.external-left {
        display: none !important;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }

    .upload-zone {
        padding: 40px 16px;
    }

    .upload-icon-new {
        font-size: 3rem;
    }

    .link-box {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .copy-button {
        width: 100%;
    }

    .additional-options.show {
        padding: 20px;
    }

    .character-wrapper {
        display: none !important;
    }
}