:root {
    --theater-gold: #d4af37;
    --theater-gold-light: #f7e08a;
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(212, 175, 55, 0.3);
    --text-main: #e2e8f0;
    --primary-gradient: linear-gradient(135deg, #1e293b, #0f172a);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    background: #020617;
    color: var(--text-main);
    min-height: 100vh;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(212, 175, 55, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(96, 165, 250, 0.05) 0%, transparent 40%);
}

.uranai-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
}

.header p {
    color: var(--theater-gold);
    font-family: 'Outfit', sans-serif;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 900;
    margin: 0;
    background: linear-gradient(to bottom, #fff, var(--theater-gold));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

/* Ranna Talk Section */
.ranna-talk {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.ranna-avatar {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid var(--theater-gold);
    overflow: hidden;
    background: var(--glass-bg);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

.ranna-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message-bubble {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    border-top-left-radius: 4px;
    padding: 1.2rem 1.5rem;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    flex-grow: 1;
    line-height: 1.8;
}

.message-bubble::after {
    content: '';
    position: absolute;
    left: -10px;
    top: 15px;
    border-width: 10px 10px 10px 0;
    border-style: solid;
    border-color: transparent var(--glass-border) transparent transparent;
    display: none;
    /* We used border-radius trick instead */
}

/* Form Section */
.uranai-form {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.input-group {
    margin-bottom: 1.5rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

input[type="text"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    color: #fff;
    font-size: 1.1rem;
    text-align: center;
    transition: all 0.3s;
    outline: none;
}

input[type="text"]:focus {
    border-color: var(--theater-gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.btn-uranai {
    background: linear-gradient(135deg, var(--theater-gold), #b8860b);
    color: #000;
    border: none;
    border-radius: 50px;
    padding: 1rem 3rem;
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.4);
}

.btn-uranai:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.6);
    filter: brightness(1.1);
}

.btn-uranai:disabled {
    filter: grayscale(1);
    cursor: not-allowed;
    transform: none;
}

/* Results Display */
#result-display {
    display: none;
    animation: fadeIn 0.8s ease-out;
}

.result-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 2rem;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.chart-area {
    max-width: 400px;
    margin: 0 auto 2rem;
}

.luck-details {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.luck-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.luck-label {
    font-size: 0.8rem;
    color: var(--theater-gold);
    margin-bottom: 0.5rem;
    display: block;
}

.luck-stars {
    color: var(--theater-gold);
    font-size: 0.9rem;
}

/* special c01 Reward */
.reward-display {
    display: none;
    text-align: center;
    margin-top: 2rem;
    padding: 2rem;
    border: 2px solid var(--theater-gold);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(0, 0, 0, 0.5));
    animation: glow 2s infinite alternate;
}

.reward-img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glow {
    from {
        box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
    }

    to {
        box-shadow: 0 0 30px rgba(212, 175, 55, 0.6);
    }
}

/* X Share Section */
.share-section {
    text-align: center;
    margin-top: 2rem;
}

.btn-x {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #000;
    color: #fff;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    border: 1px solid #333;
    font-weight: 700;
    transition: all 0.3s;
}

.btn-x:hover {
    background: #222;
    border-color: var(--theater-gold);
    transform: translateY(-2px);
}

@media (max-width: 600px) {
    .ranna-talk {
        flex-direction: column;
        align-items: center;
    }

    .message-bubble {
        border-radius: 20px;
        border-top-left-radius: 20px;
    }
}