/* ベーススタイル */
:root {
    --primary-color: #e91e8c;
    --primary-light: #fce4ec;
    --primary-dark: #ad1457;
    --secondary-color: #4caf50;
    --background: linear-gradient(135deg, #fce4ec 0%, #f3e5f5 50%, #e8f5e9 100%);
    --text-color: #333;
    --text-light: #666;
    --white: #fff;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
    --border-radius: 16px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Zen Maru Gothic', 'Noto Sans JP', sans-serif;
    background: var(--background);
    min-height: 100vh;
    color: var(--text-color);
    line-height: 1.8;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#start-screen {
  padding-top: 80px;
}

/* ヘッダー */
.header {
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    width: 100%;
}

.header img {
    width: 220px;
    max-width: 65%;
    display: block;
    margin: 0 auto;
    animation: titleFloat 3s ease-in-out infinite;
}

@keyframes titleFloat {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-10px); }
}

.header h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-light);
    font-size: 1rem;
}

/* スクリーン切り替え */
.screen {
    display: none;
    flex: 1;
}

.screen.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

/* スタート画面 */
.start-content {
    padding: 0px 30px;
    text-align: center;
}

.flower-icons {
    font-size: 2.5rem;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.flower-icons span {
    animation: float 3s ease-in-out infinite;
}

.flower-icons span:nth-child(2) { animation-delay: 0.5s; }
.flower-icons span:nth-child(3) { animation-delay: 1s; }
.flower-icons span:nth-child(4) { animation-delay: 1.5s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.start-content h2 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 15px;
    line-height: 1.5;
}

.description {
    color: var(--text-light);
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.info-box {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    color: var(--text-light);
}

/* ボタン */
.btn {
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(233, 30, 140, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(233, 30, 140, 0.5);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    margin-top: 30px;
}

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

/* 質問画面 */
.progress-container {
    margin-bottom: 30px;
}

.progress-bar {
    background: #e0e0e0;
    border-radius: 10px;
    height: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    background: linear-gradient(90deg, var(--primary-color), #f06292);
    height: 100%;
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 10px;
}

.progress-text {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

.question-category {
    text-align: center;
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    padding: 10px 20px;
    background: var(--primary-light);
    border-radius: 20px;
    display: inline-block;
    width: 100%;
}

/* 質問リスト */
.questions-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.question-item {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 25px 20px;
    box-shadow: var(--shadow);
}

.question-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.question-number {
    background: #3d3d3d;
    color: var(--white);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.question-text-new {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-color);
    line-height: 1.6;
    padding-top: 4px;
}

/* ラジオボタンスケール */
.radio-scale {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.scale-label {
    font-size: 0.85rem;
    color: var(--text-light);
    min-width: 40px;
}

.scale-label.left {
    text-align: right;
}

.scale-label.right {
    text-align: left;
}

.scale-options {
    display: flex;
    align-items: center;
    gap: 20px;
}

.scale-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.scale-option input {
    display: none;
}

.radio-circle {
    width: 44px;
    height: 44px;
    border: 2px solid #5c5c8a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    background: var(--white);
}

/* サイズバリエーション（中央に向かって小さく） */
.scale-option[data-size="medium"] .radio-circle {
    width: 38px;
    height: 38px;
}

.scale-option[data-size="small"] .radio-circle {
    width: 32px;
    height: 32px;
}

.scale-option[data-size="small"] .check-icon {
    font-size: 1rem;
}

.radio-circle:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.scale-option input:checked + .radio-circle {
    background: #5c5c8a;
    border-color: #5c5c8a;
}

.radio-circle .check-icon {
    display: none;
    color: var(--white);
    font-size: 1.2rem;
}

.scale-option input:checked + .radio-circle .check-icon {
    display: block;
}

.scale-number {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ナビゲーションボタン */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 20px;
}

.btn-nav {
    background: var(--white);
    color: var(--text-color);
    border: 2px solid #e0e0e0;
    padding: 14px 30px;
}

.btn-nav:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 結果画面 */
.result-content {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 40px 25px;
    box-shadow: var(--shadow);
    text-align: center;
}

.result-label {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 15px;
}

.result-flower {
    font-size: 5rem;
    margin-bottom: 15px;
    animation: pulse 2s ease-in-out infinite;
}

.result-flower-img {
    width: 220px;
    height: 220px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

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

.result-type {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.result-tagline {
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 30px;
    padding: 0 10px;
    font-size: 0.95rem;
}

.result-section {
    text-align: left;
    margin-bottom: 25px;
    padding: 20px;
    background: #fafafa;
    border-radius: 12px;
}

.result-section h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-light);
}

.result-section p {
    color: var(--text-color);
    line-height: 1.9;
}

.traits {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.trait-tag {
    background: linear-gradient(135deg, var(--primary-light), #f3e5f5);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--primary-dark);
}

.flower-info {
    background: linear-gradient(135deg, #fff9c4, #fff3e0);
}

.flower-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.flower-table tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.flower-table tr:last-child {
    border-bottom: none;
}

.flower-table td {
    padding: 12px 8px;
    font-size: 0.95rem;
}

.flower-table td:first-child {
    font-weight: 600;
    color: var(--primary-dark);
    width: 35%;
}

.compatibility {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.compat-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--white);
    border-radius: 10px;
}

.compat-flower {
    font-size: 1.8rem;
}

.compat-info {
    flex: 1;
}

.compat-name {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
}

.compat-reason {
    font-size: 0.9rem;
    color: var(--text-light);
}

.message-box {
    background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
    border-left: 4px solid var(--secondary-color);
}

.message-box p {
    font-weight: 500;
}

/* シェアセクション */
.share-section {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 2px dashed #e0e0e0;
}

.share-section h3 {
    text-align: center;
    color: var(--text-color);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.share-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    color: var(--white);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.share-btn.twitter {
    background: #000;
}

.share-btn.facebook {
    background: #1877f2;
}

.share-btn.line {
    background: #00b900;
}

.share-btn.copy {
    background: #607d8b;
}

.copy-message {
    text-align: center;
    margin-top: 15px;
    color: var(--secondary-color);
    font-weight: 500;
    min-height: 24px;
}

/* フッター */
.footer {
    text-align: center;
    padding: 30px 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* レスポンシブ */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    .header h1 {
        font-size: 1.6rem;
    }

    .start-content {
        padding: 30px 20px;
    }

    .flower-icons {
        font-size: 2rem;
    }

    .start-content h2 {
        font-size: 1.3rem;
    }

    .question-item {
        padding: 20px 15px;
    }

    .question-text-new {
        font-size: 1rem;
    }

    .scale-options {
        gap: 10px;
    }

    .radio-circle {
        width: 38px;
        height: 38px;
    }

    .scale-option[data-size="medium"] .radio-circle {
        width: 32px;
        height: 32px;
    }

    .scale-option[data-size="small"] .radio-circle {
        width: 26px;
        height: 26px;
    }

    .scale-option[data-size="small"] .check-icon {
        font-size: 0.8rem;
    }

    .scale-label {
        font-size: 0.75rem;
        min-width: 30px;
    }

    .radio-scale {
        gap: 8px;
    }

    .result-content {
        padding: 30px 20px;
    }

    .result-flower {
        font-size: 4rem;
    }

    .result-type {
        font-size: 1.5rem;
    }

    .share-buttons {
        grid-template-columns: 1fr;
    }

    .btn {
        padding: 14px 30px;
        font-size: 1rem;
    }

    .navigation-buttons {
        flex-direction: column;
    }

    .btn-nav {
        order: 2;
    }

    .navigation-buttons .btn-primary {
        order: 1;
    }
}

/* ローディングアニメーション */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.loading::after {
    content: "🌸";
    font-size: 3rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
