/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

/* 画面表示制御 */
.screen {
    display: none;
    min-height: 100vh;
    padding: 20px 0;
}

.screen.active {
    display: block;
}

/* スタート画面 */
.header {
    text-align: center;
    margin-bottom: 50px;
}

.main-title {
    font-size: 2rem;
    color: white;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.main-title i {
    margin-right: 10px;
    color: #ffd700;
}

.subtitle {
    font-size: 1.2rem;
    color: #f0f8ff;
    font-weight: 300;
}

.hero-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
}

.animal-icons {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.animal-icon {
    font-size: 4rem;
    animation: bounce 2s infinite;
}

.animal-icon.cat {
    animation-delay: 0.5s;
}

.animal-icon.dog {
    animation-delay: 1s;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

.catch-copy {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.4;
}

.highlight {
    color: #667eea;
    font-weight: 700;
}

.description {
    margin-bottom: 40px;
}

.description p {
    color: #666;
    font-size: 1rem;
    line-height: 1.8;
}

.start-button {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 20px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.start-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.start-button i {
    margin-right: 10px;
}

/* 診断画面 */
#diagnosis-screen .container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    margin-top: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.progress-bar {
    position: relative;
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    margin-bottom: 40px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 20%;
}

.progress-text {
    text-align: center;
    margin-top: 10px;
    color: #666;
    font-weight: 600;
}

.question-container {
    text-align: center;
}

.question-number {
    font-size: 3rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 20px;
}

.question-text {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 40px;
    line-height: 1.4;
}

.answer-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.answer-option {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    text-align: left;
}

.answer-option:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateX(10px);
}

.answer-option.selected {
    border-color: #667eea;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

/* 結果算出中画面 */
#calculating-screen .container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.calculating-animation {
    text-align: center;
    color: white;
}

.spinner {
    font-size: 4rem;
    margin-bottom: 30px;
}

.calculating-animation h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.loading-dots span {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    animation: loadingDot 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes loadingDot {
    0%, 80%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    40% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 結果画面 */
#result-screen .container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    margin-top: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.result-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.result-animal {
    font-size: 6rem;
    margin-bottom: 20px;
    animation: zoomIn 0.8s ease-out;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.3);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.result-title {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 10px;
}

.result-type {
    font-size: 2.2rem;
    color: #667eea;
    font-weight: 700;
}

.result-content {
    margin-bottom: 40px;
}

.result-section {
    margin-bottom: 30px;
    padding: 25px;
    background: #f8f9ff;
    border-radius: 15px;
    border-left: 5px solid #667eea;
}

.result-section h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-section h3 i {
    color: #667eea;
}

.result-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}

/* CTA セクション */
.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 30px;
}

.cta-section h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.cta-section p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cta-button.primary {
    background: white;
    color: #667eea;
}

.cta-button.primary:hover {
    background: #f0f8ff;
    transform: translateY(-3px);
}

.cta-button.secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

.cta-button.secondary:hover {
    background: white;
    color: #667eea;
}

.cta-button.tertiary {
    background: #06C755;
    color: white;
}

.cta-button.tertiary:hover {
    background: #05b84f;
    transform: translateY(-3px);
}

.retry-section {
    text-align: center;
}

.retry-button {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 50px;
    padding: 12px 30px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-button:hover {
    background: #667eea;
    color: white;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .main-title {
        font-size: 1.5rem;
    }
    
    .catch-copy {
        font-size: 1.4rem;
    }
    
    .animal-icons {
        gap: 20px;
    }
    
    .animal-icon {
        font-size: 3rem;
    }
    
    .hero-section,
    #diagnosis-screen .container,
    #result-screen .container {
        padding: 25px;
    }
    
    .question-text {
        font-size: 1.3rem;
    }
    
    .result-animal {
        font-size: 4rem;
    }
    
    .result-type {
        font-size: 1.8rem;
    }
    
    .cta-buttons {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.3rem;
    }
    
    .catch-copy {
        font-size: 1.2rem;
    }
    
    .animal-icon {
        font-size: 2.5rem;
    }
    
    .hero-section,
    #diagnosis-screen .container,
    #result-screen .container {
        padding: 20px;
    }
    
    .cta-section {
        padding: 25px;
    }
}