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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    min-height: 100vh;
    background: #36393f;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.container {
    background-color: #2f3136;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 10px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 10px;
}

h2 {
    color: #7289da;
    font-size: clamp(18px, 5vw, 24px);
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.about-btn {
    background: none;
    width: auto !important;
    padding: 8px 12px;
    font-size: clamp(12px, 3.5vw, 14px);
    color: #b9bbbe;
    margin-left: auto;
    flex-shrink: 0;
    min-width: 60px;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: clamp(12px, 3.5vw, 14px);
    color: #b9bbbe;
    font-weight: 500;
}

input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background-color: rgba(32, 34, 37, 0.9);
    color: #fff;
    font-size: clamp(14px, 4vw, 16px);
    transition: all 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

input[type="text"]:focus {
    outline: none;
    border-color: #7289da;
    box-shadow: 0 0 0 3px rgba(114, 137, 218, 0.25);
}

button {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(45deg, #7289da, #8ea1e1);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: clamp(14px, 4vw, 16px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

button:active {
    transform: scale(0.98);
}

#result-container {
    min-height: 150px;
    position: relative;
    margin-top: 20px;
    border-radius: 8px;
    background-color: rgba(32, 34, 37, 0.5);
    padding: 12px;
}

.loading {
    display: none;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(114, 137, 218, 0.2);
    border-top: 3px solid #7289da;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.htmx-request .result-content {
    opacity: 0.5;
}

.throne-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 15px 0;
    min-height:275px;
}

.throne-wrapper {
    width: 100%;
    max-width: 200px;
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.throne-wrapper img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.placeholder-text {
    color: #72767d;
    font-size: clamp(12px, 3.5vw, 14px);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    text-align: center;
    width: 90%;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    padding: 15px;
}

.modal-content {
    position: relative;
    background: #36393f;
    padding: 20px;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
    border: 1px solid rgba(255,255,255,0.1);
    margin: 50px auto;
}

.modal-title {
    color: #7289da;
    margin-bottom: 16px;
    font-size: clamp(16px, 4.5vw, 18px);
}

.modal-text {
    color: #dcddde;
    font-size: clamp(12px, 3.5vw, 14px);
    line-height: 1.6;
    margin-bottom: 12px;
}

.modal-link {
    color: #7289da;
    text-decoration: none;
}

.modal-link:hover {
    text-decoration: underline;
}

/* Touch device optimizations */
@media (hover: none) {
    button:hover {
        transform: none;
    }
}

/* Small mobile devices */
@media (max-width: 320px) {
    .container {
        padding: 15px;
    }

    .header {
        margin-bottom: 15px;
    }

    input[type="text"] {
        padding: 10px;
    }

    button {
        padding: 10px 16px;
    }
}

/* Fix for iOS Safari */
@supports (-webkit-touch-callout: none) {
    .container {
        margin-bottom: env(safe-area-inset-bottom);
    }
    
    input[type="text"] {
        font-size: 16px;
    }
}
  /* Add to your existing styles */
  .type-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.type-option {
    background-color: rgba(32, 34, 37, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

.type-option.selected {
    border-color: #7289da;
    background: rgba(114, 137, 218, 0.1);
}

.type-option:hover {
    border-color: #7289da;
}

.type-option-label {
    display: block;
    color: #dcddde;
    font-size: 14px;
    font-weight: 500;
}
.input-group.second-user {
    margin-top: 10px;
    opacity: 0;
    height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.input-group.second-user.visible {
    opacity: 1;
    height: auto;
    margin-top: 15px;
}

.optional-label {
    font-size: 12px;
    color: #7289da;
    margin-left: 8px;
}
.input-group.second-user {
    margin-top: 10px;
    opacity: 0;
    height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.input-group.second-user.visible {
    opacity: 1;
    height: auto;
    margin-bottom: 24px;
}

.optional-label, .required-label {
    font-size: 12px;
    margin-left: 8px;
}

.optional-label, .required-label {
    color: #7289da;
}
.customize-controls {
    display: none;
    margin-top: 15px;
    padding: 15px;
    background: rgba(32, 34, 37, 0.9);
    border-radius: 8px;
}

.customize-controls.visible {
    display: block;
}

.preview-container {
    width: 128px;
    height: 220px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.preview-image {
    max-width: 100%;
    max-height: 100%;
}

.control-group {
    margin-bottom: 15px;
    text-align: center;
}

.control-button {
    background: #2f3136;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #dcddde;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0 5px;
}

.control-button:hover {
    border-color: #7289da;
    background: rgba(114, 137, 218, 0.1);
}

.type-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}
.new-badge {
    background: #7289da;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    position: absolute;
    top: -8px;
    right: -8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.type-option {
    position: relative; /* For new-badge positioning */
}