body {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    font-family: 'Hiragino Kaku Gothic Pro', 'ヒラギノ角ゴ Pro W3', 'Meiryo', 'メイリオ', sans-serif;
}

.hero-section {
    background: rgba(0, 0, 0, 0.3);
    padding: 40px 0 60px 0;
    text-align: center;
    color: white;
}

.title-image {
    max-width: 400px;
    width: 100%;
    height: auto;
    margin-bottom: 30px;
    margin-top: -10px;
}

.main-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 40px;
    margin: 40px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.character-card {
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    background: linear-gradient(135deg, #f8f9ff 0%, #fff 100%);
    position: relative;
    overflow: hidden;
}

.character-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.character-card:hover::before,
.character-card.active::before {
    opacity: 1;
}

.character-card:hover {
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    transform: translateY(-3px);
    background: linear-gradient(135deg, #f0f2ff 0%, #fff 100%);
}

.character-card.active {
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
    background: linear-gradient(135deg, #f0f2ff 0%, #fff 100%);
}

.character-card input[type="radio"] {
    transform: scale(1.2);
}

.character-image {
    width: 140px;
    height: 180px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 15px;
    border: 3px solid #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.character-info h5 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-weight: bold;
}

.character-details {
    color: #667eea;
    font-size: 0.9em;
    margin-bottom: 12px;
    font-weight: 500;
}

.character-description {
    color: #495057;
    font-size: 0.95em;
    line-height: 1.5;
}

.dream-textarea {
    min-height: 150px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s ease;
}

.dream-textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.analyze-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 15px 40px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 50px;
    color: white;
    transition: all 0.3s ease;
}

.analyze-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.section-title {
    color: #2c3e50;
    font-weight: bold;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 0;
    border-bottom: 2px solid #f1f3f4;
}

.section-title i {
    color: #667eea;
    font-size: 1.3em;
}

footer {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 30px 0;
    margin-top: 60px;
}

footer a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: white;
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

/* 結果ページ用のスタイル */
.result-container {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 50px;
    margin: 40px 0;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.result-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.teacher-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9ff 0%, #fff 100%);
    border-radius: 15px;
    border: 2px solid #e9ecef;
}

.teacher-image {
    width: 120px;
    height: 150px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 20px;
    border: 3px solid #fff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.teacher-name {
    color: #2c3e50;
    font-size: 1.8em;
    font-weight: bold;
    margin-bottom: 10px;
}

.teacher-subtitle {
    color: #667eea;
    font-size: 1.1em;
    margin-bottom: 15px;
}

.analysis-result {
    background: #fff;
    border-radius: 15px;
    padding: 40px;
    margin: 30px 0;
    border: 1px solid #e9ecef;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    line-height: 1.8;
    font-size: 1.05em;
}

.analysis-result h3 {
    color: #2c3e50;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f3f4;
}

.analysis-result h3 i {
    color: #667eea;
    font-size: 1.2em;
}

.analysis-content {
    color: #495057;
    white-space: pre-line;
}

.action-buttons {
    text-align: center;
    margin-top: 40px;
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-custom {
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary-custom {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-secondary-custom {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    border: none;
    color: white;
}

.btn-secondary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(108, 117, 125, 0.4);
    color: white;
}

.floating-elements {
    position: absolute;
    top: 20px;
    right: 20px;
    opacity: 0.1;
    font-size: 3em;
    color: #667eea;
    z-index: 1;
}

@media (max-width: 768px) {
    .result-container {
        padding: 30px 20px;
        margin: 20px 0;
    }
    
    .teacher-header {
        padding: 20px;
    }
    
    .analysis-result {
        padding: 25px 20px;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-custom {
        width: 100%;
        max-width: 300px;
    }
    
    .character-card {
        margin-bottom: 10px;
    }
    
    .col-lg-6.mb-4 {
        margin-bottom: 0.5rem !important;
    }
    
    .title-image {
        max-width: 300px;
        margin-bottom: 20px;
    }
    
    .hero-section {
        padding: 30px 0 40px 0;
    }
}

/* ローディングインジケーター */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e9ecef;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-text {
    color: #2c3e50;
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 10px;
}

.loading-subtext {
    color: #667eea;
    font-size: 1em;
    margin-bottom: 20px;
}

.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s infinite;
}

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

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}