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

:root {
    --bg: #ffffff;
    --text-primary: #000000;
    --text-secondary: #666666;
    --border: #e5e5e5;
    --accent: #000000;
    --hover: #f5f5f5;
    --shadow: rgba(0, 0, 0, 0.04);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
    background: url('bg.png') center center / cover no-repeat;
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
    position: relative;
}

@media (max-width: 768px) {
    body {
        align-items: flex-start;
        padding-top: 20px;
        padding-bottom: 20px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

.background-blur,
.gradient-orb {
    display: none;
}

.container {
    max-width: 680px;
    width: 100%;
    animation: fadeIn 0.6s ease-out;
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .container {
        padding-top: 0;
        margin-top: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    header {
        margin-bottom: 30px;
    }
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.title {
    font-size: 56px;
    font-weight: 900;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.04em;
    margin-bottom: 12px;
    line-height: 1.1;
}

.title-word {
    display: inline;
    color: #FFF5C7;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 26px;
    color: #FFF5C7;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    max-width: 500px;
    margin: 0 auto;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), 0 3px 8px rgba(0, 0, 0, 0.3);
}

/* Main section */
.merger-section {
    background: transparent;
    border-radius: 16px;
    padding: 0;
    padding-bottom: 0;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.input-group {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    padding: 0px;
    gap: 30px;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .input-group {
        flex-direction: column;
    }
}

.input-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 0px;
    width: 280px;
    flex: none;
    order: 1;
    flex-grow: 0;
    isolation: isolate;
}

.input-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #FFF5C7;
    margin-bottom: 8px;
    padding-left: 2px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-left {
    position: absolute;
    left: 16px;
    font-size: 20px;
    opacity: 0.5;
    pointer-events: none;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    padding: 2px;
    background: linear-gradient(to right, rgba(39, 39, 39, 0.6) 0%, rgba(83, 83, 83, 0.6) 100%);
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
}

.input-wrapper input {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0px 16px;
    gap: 10px;
    width: 280px;
    height: 50px;
    background: rgba(62, 63, 65, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 10px;
    border: none;
    font-size: 16px;
    font-weight: 400;
    color: #ffffff;
    transition: all 0.2s ease;
    font-family: inherit;
    position: relative;
    z-index: 0;
}

.input-wrapper input:hover {
    background: rgba(62, 63, 65, 0.6);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
}

.input-wrapper input:focus {
    outline: none;
    background: rgba(62, 63, 65, 0.7);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
}

.input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.merge-symbol {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 32px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .merge-symbol {
        margin: 8px 0;
    }
}

.merge-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: 50%;
    color: var(--text-secondary);
}

.merge-icon svg {
    width: 16px;
    height: 16px;
}


/* Button */
.merge-button {
    position: relative;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 21px 119px;
    gap: 10px;
    width: 364px;
    height: 66px;
    background: #FFFFFF;
    border-radius: 10px;
    flex: none;
    order: 2;
    flex-grow: 0;
    font-size: 20px;
    font-weight: 900;
    font-style: normal;
    color: #000000;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    isolation: isolate;
    margin: 0 auto;
    margin-top: 20px;
    white-space: nowrap;
}

.merge-button::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -4px;
    border-radius: 10px;
    background: linear-gradient(to right, #65468C 0%, #DC89B7 37%, #F7F7B9 70%, #024F97 100%);
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: -1;
    padding: 2px;
    padding-bottom: 4px;
}

.button-glow {
    display: none;
}

.button-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.merge-button:hover {
    background: #f5f5f5;
    transform: translateY(-1px);
}

.merge-button:active {
    transform: translateY(0);
}

.button-emoji {
    font-size: 18px;
    display: inline-block;
}

.merge-button.processing {
    pointer-events: none;
    background: #e5e5e5;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.merge-button.processing:hover {
    transform: none;
}

.merge-button.processing .button-emoji {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Loading screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('bg.png') center center / cover no-repeat;
    z-index: 1000;
    will-change: opacity;
}

.loading-gif {
    max-width: 400px;
    width: 400px;
    height: auto;
}

@media (max-width: 768px) {
    .loading-gif {
        max-width: 85%;
        width: 85%;
    }
}

.hidden {
    display: none !important;
}


/* Footer */
footer {
    text-align: center;
    margin-top: 48px;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .title {
        font-size: 40px;
    }
    
    .subtitle {
        font-size: 16px;
    }
    
    .merger-section {
        padding: 0;
        gap: 32px;
        width: 100%;
    }
    
    .input-group {
        flex-direction: column;
        gap: 16px;
        width: 100%;
    }
    
    .input-card {
        width: 100%;
    }
    
    .input-wrapper {
        width: 100%;
    }
    
    .input-wrapper input {
        width: 100%;
    }
    
    .merge-button {
        width: 100%;
        padding: 21px 24px;
        margin-top: 0;
    }
    
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* Remove all crazy animations */
@keyframes float { }
@keyframes slideDown { }
@keyframes colorCycle { }
@keyframes rotate360 { }
@keyframes wiggle { }
@keyframes pulse { }
@keyframes shine { }
@keyframes gradientFlow { }
@keyframes bounce { }

/* Palm image */
.palm-image {
    position: fixed;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 80%;
    height: auto;
    z-index: -1;
    transition: transform 0.2s ease;
}

@media (max-width: 768px) {
    .palm-image {
        max-width: 60%;
        bottom: 20px;
    }
}

/* Poster Background Animation */
.poster-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.poster-item {
    position: absolute;
    width: 150px;
    height: 225px;
    opacity: 1;
    will-change: transform;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    pointer-events: none;
}

.poster-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 
        inset 0 3px 6px rgba(0, 0, 0, 0.4),
        inset 0 -3px 6px rgba(0, 0, 0, 0.3),
        inset 3px 0 6px rgba(0, 0, 0, 0.3),
        inset -3px 0 6px rgba(0, 0, 0, 0.3),
        0 10px 20px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(0, 0, 0, 0.1);
    filter: brightness(0.85) contrast(1.15);
    border: 1px solid rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .poster-item {
        width: 100px;
        height: 150px;
        opacity: 1;
    }
}
