/* Base Reset & Fonts */
:root {
    --primary-color: #6a11cb;
    --secondary-color: #2575fc;
    --accent-color: #ff0080;
    --text-color: #333;
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

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

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
    padding: 20px;
}

/* Glassmorphism Container */
.container {
    background: var(--glass-bg);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    width: 100%;
    max-width: 600px;
    padding: 40px;
    text-align: center;
}

header h1 {
    font-size: 2rem;
    color: var(--white);
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

header p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

/* Inputs & Forms */
.input-group {
    margin-bottom: 20px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--white);
    font-weight: bold;
}

input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

input[type="text"]:focus {
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
}

/* Radio Buttons */
.radio-group {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.radio-label {
    flex: 1;
    position: relative;
    cursor: pointer;
}

.radio-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-custom {
    display: block;
    padding: 10px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: var(--white);
    text-align: center;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.radio-label input:checked~.radio-custom {
    background: var(--white);
    color: var(--primary-color);
    border-color: var(--accent-color);
    font-weight: bold;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Buttons */
.gacha-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--white);
    background: linear-gradient(135deg, var(--accent-color), #ff4b1f);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    margin-top: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.gacha-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.gacha-btn:active {
    transform: translateY(1px);
}

.gacha-btn.loading {
    opacity: 0.8;
    cursor: wait;
}

/* Result Area */
.result-area {
    margin-top: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.5s ease;
}

.result-area.hidden {
    display: none;
}

.result-area h2 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 5px;
    display: inline-block;
}

.apology-content {
    background: #fdfdfd;
    padding: 20px;
    border-radius: 10px;
    border: 2px dashed #ccc;
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #444;
    white-space: pre-wrap;
    /* \nを改行として表示 */
    text-align: left;
    /* 左寄せにしてメール風の表示を見やすくする */
}

.secondary-btn {
    padding: 10px 20px;
    border-radius: 20px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    font-weight: bold;
    cursor: pointer;
    margin: 0 5px;
    transition: all 0.3s;
}

.secondary-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

footer {
    margin-top: 40px;
    color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 480px) {
    .container {
        padding: 20px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .radio-custom {
        font-size: 0.9rem;
    }
}

/* =========================================
   Area C Additional Styles
   ========================================= */

.additional-results {
    margin-bottom: 20px;
}

.result-block {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.result-block h3 {
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: var(--primary-color);
    border-left: 4px solid var(--accent-color);
    padding-left: 10px;
    text-align: left;
}

/* Forgiveness Rate */
.forgiveness-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.rate-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--text-color);
    line-height: 1.2;
}

.rate-comment {
    font-size: 1rem;
    color: #555;
    font-weight: bold;
}

/* Omikuji */
.omikuji-card {
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    position: relative;
    transition: all 0.3s ease;
}

.omikuji-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 10px;
}

.omikuji-type {
    font-size: 1.5rem;
    font-weight: bold;
    color: #d32f2f;
    /* Standard Omikuji Red */
}

.luck-label {
    font-size: 0.9rem;
    color: #777;
}

.omikuji-luck {
    font-weight: bold;
    color: #333;
    font-size: 1.1rem;
}

.omikuji-content {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 15px;
    text-align: left;
}

.omikuji-item-row {
    font-size: 0.9rem;
    color: #555;
    background: #f0f0f0;
    padding: 8px;
    border-radius: 5px;
}

/* SSR Special Styles */
.ssr-card {
    background: linear-gradient(135deg, #fff0f0, #fff8e1);
    border: 2px solid #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    animation: pulse 2s infinite;
}

.ssr-text {
    background: linear-gradient(to right, #ff00cc, #333399);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.5);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
    }

    50% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 5px rgba(255, 0, 128, 0.3);
    }

    100% {
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
    }
}