/* ===== リセット・ベーススタイル ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', 'Arial', 'Hiragino Sans', 'Meiryo', sans-serif;
    line-height: 1.6;
    color: #2c1810;
    background: linear-gradient(135deg, #f4e5d3 0%, #e8d5c4 50%, #dcc5a8 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== レイアウト ===== */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.screen.active {
    opacity: 1;
    visibility: visible;
}

/* ===== スタート画面 ===== */
#start-screen {
    background: linear-gradient(135deg, #d4a574 0%, #b8956a 50%, #a68660 100%);
    color: #fff;
}

.main-title {
    font-size: 3.5rem;
    font-weight: 300;
    text-align: center;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 0.1em;
}

.subtitle {
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 3rem;
    opacity: 0.9;
    font-weight: 300;
}

.start-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 3rem;
    opacity: 0.9;
    background: rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

/* ===== ボタンスタイル ===== */
.btn {
    display: inline-block;
    padding: 1.2rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.05em;
    min-width: 200px;
}

.btn-primary {
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 69, 19, 0.5);
    background: linear-gradient(135deg, #a0522d 0%, #8b4513 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #cd853f 0%, #daa520 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(205, 133, 63, 0.4);
}

.btn-secondary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(205, 133, 63, 0.5);
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-outline {
    background: transparent;
    color: #8b4513;
    border: 2px solid #8b4513;
}

.btn-outline:hover {
    background: #8b4513;
    color: #fff;
    transform: translateY(-2px);
}

/* ===== 質問画面 ===== */
#question-screen {
    background: linear-gradient(135deg, #f4e5d3 0%, #e8d5c4 100%);
}

.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: rgba(139, 69, 19, 0.2);
    border-radius: 0;
    z-index: 1000;
    overflow: hidden;
}

#question-screen .container {
    padding-top: 3rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b4513 0%, #cd853f 100%);
    border-radius: 3px;
    transition: width 0.4s ease;
    width: 0%;
}

.question-counter {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #8b4513;
    font-weight: 600;
    z-index: 1001;
    box-shadow: 0 2px 10px rgba(139, 69, 19, 0.2);
    backdrop-filter: blur(10px);
}

.question-container {
    background: #fff;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(139, 69, 19, 0.1);
    backdrop-filter: blur(10px);
}

.question-text {
    font-size: 1.5rem;
    color: #2c1810;
    text-align: center;
    margin-bottom: 2.5rem;
    font-weight: 400;
    line-height: 1.4;
}

.answers-container {
    display: grid;
    gap: 1rem;
    margin-bottom: 3rem;
}

.answer-option {
    background: linear-gradient(135deg, #f9f6f0 0%, #f0ebe0 100%);
    border: 2px solid transparent;
    padding: 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    line-height: 1.5;
    color: #2c1810;
}

.answer-option:hover {
    background: linear-gradient(135deg, #e8d5c4 0%, #dcc5a8 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.1);
}

.answer-option.selected {
    background: linear-gradient(135deg, #d4a574 0%, #cd853f 100%);
    color: #fff;
    border-color: #8b4513;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(139, 69, 19, 0.3);
}

/* ===== ローディング画面 ===== */
#loading-screen {
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 50%, #cd853f 100%);
    color: #fff;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 2rem;
}

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

.loading-text {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 300;
}

.loading-subtext {
    font-size: 1rem;
    opacity: 0.8;
}

/* ===== 結果画面 ===== */
#result-screen {
    background: linear-gradient(135deg, #2c1810 0%, #4a3429 50%, #6b4e37 100%);
    color: #f4e5d3;
    overflow-y: auto;
    align-items: flex-start;
    padding-top: 2rem;
}

.result-header {
    text-align: center;
    margin-bottom: 3rem;
}

.result-title {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    color: #d4a574;
}

.result-type {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 2rem;
    color: #f4e5d3;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.result-content {
    background: rgba(244, 229, 211, 0.1);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 3rem;
    backdrop-filter: blur(10px);
}

.result-section {
    margin-bottom: 2.5rem;
}

.result-section h3 {
    font-size: 1.3rem;
    color: #d4a574;
    margin-bottom: 1rem;
    border-bottom: 2px solid #d4a574;
    padding-bottom: 0.5rem;
}

.result-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #f0ebe0;
}

.result-list {
    list-style: none;
}

.result-list li {
    font-size: 1rem;
    padding: 0.5rem 0;
    color: #f0ebe0;
    position: relative;
    padding-left: 1.5rem;
}

.result-list li:before {
    content: "✦";
    color: #d4a574;
    position: absolute;
    left: 0;
    top: 0.5rem;
}

.color-palette {
    display: flex;
    gap: 4rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    justify-content: center;
}

.color-swatch {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid #f4e5d3;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    position: relative;
    margin-bottom: 2rem;
}

.color-name {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: #d4a574;
    white-space: nowrap;
    text-align: center;
    min-width: 60px;
}

.result-cosmetics {
    font-size: 1rem;
    color: #f0ebe0;
    line-height: 1.6;
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ===== レスポンシブデザイン ===== */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .main-title {
        font-size: 2.5rem;
    }
    
    .question-container {
        padding: 2rem;
    }
    
    .question-text {
        font-size: 1.3rem;
    }
    
    .result-content {
        padding: 2rem;
    }
    
    .result-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2rem;
    }
    
    .question-container {
        padding: 1.5rem;
    }
    
    .result-content {
        padding: 1.5rem;
    }
}
