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

html {
    min-height: 100vh;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease-out;
}

header h1 {
    color: white;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

main {
    animation: fadeInUp 0.8s ease-out;
}

.initial-message {
    animation: fadeInUp 0.8s ease-out;
}

.message-card {
    background: white;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.message-card p {
    font-size: 1.3em;
    color: #667eea;
    margin-bottom: 20px;
}

.settings-button-container {
    text-align: center;
    margin-top: 30px;
}

.btn-settings {
    padding: 12px 30px;
    background: #868e96;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn-settings:hover {
    background: #495057;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* モーダルスタイル */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 2px solid #f0f0f0;
    flex-shrink: 0;
}

.modal-header h2 {
    color: #667eea;
    margin: 0;
    font-size: 1.5em;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2em;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
}

.close-btn:hover {
    color: #333;
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.modal-description {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.95em;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 2px solid #f0f0f0;
    text-align: right;
    flex-shrink: 0;
}

.btn-primary-small {
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.btn-primary-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.4);
}

.settings-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.settings-section h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5em;
}

#participants-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.participant-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.participant-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
}

.participant-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.remove-btn {
    padding: 8px 15px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.remove-btn:hover {
    background: #ee5a52;
    transform: translateY(-2px);
}

.btn-secondary {
    padding: 12px 25px;
    background: #51cf66;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-secondary:hover {
    background: #40c057;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(81, 207, 102, 0.3);
}

.btn-secondary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.gacha-section {
    text-align: center;
    margin-bottom: 30px;
}

.btn-primary {
    padding: 20px 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.5em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.btn-primary:active {
    transform: translateY(-2px) scale(1.02);
}

.result-section {
    animation: bounceIn 0.8s ease-out;
}

.result-card {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.result-person {
    margin-bottom: 30px;
}

.result-person h3 {
    font-size: 2em;
    color: #667eea;
    animation: pulse 1s ease-in-out;
}

.result-theme {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    padding: 30px;
    border-left: 5px solid #667eea;
}

.result-theme p {
    font-size: 1.3em;
    line-height: 1.8;
    color: #333;
}

footer {
    text-align: center;
    margin-top: auto;
    padding: 30px 20px;
    color: white;
    font-size: 0.9em;
    width: 100%;
    background: rgba(0, 0, 0, 0.1);
}

footer p {
    margin: 5px 0;
    opacity: 0.9;
}

footer .version {
    font-size: 0.85em;
    opacity: 0.7;
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

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

/* レスポンシブデザイン */
@media (max-width: 600px) {
    header h1 {
        font-size: 1.8em;
    }

    .settings-section {
        padding: 20px;
    }

    .btn-primary {
        padding: 15px 40px;
        font-size: 1.2em;
    }

    .result-person h3 {
        font-size: 1.5em;
    }

    .result-theme p {
        font-size: 1.1em;
    }
}
