/* === CSS Design System for ラブロジック64 === */
/* Gorgeous Pink & Gold Theme for 20-40s Women */

:root {
    --primary-pink: #e8a0b4;
    --deep-rose: #d4849a;
    --soft-pink: #fdf0f4;
    --accent-gold: #d4a96a;
    --light-gold: #f5e6cd;
    --warm-beige: #f9f0e6;
    --dark-text: #4a3c3c;
    --cream: #fefaf6;
    --gold: #c9a064;
    --blush: #f2d4dc;
    --card-bg: rgba(255, 255, 255, 0.96);
    --text-dark: #4a3c3c;
    --text-muted: #9a8888;
    --shadow-soft: 0 8px 32px rgba(228, 160, 180, 0.12);
    --shadow-hover: 0 12px 48px rgba(228, 160, 180, 0.20);
    --radius-lg: 20px;
    --radius-md: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: linear-gradient(145deg, #f9eef2 0%, #fdf0f0 25%, #f5e8e4 50%, #fdf2f4 75%, #f9eef2 100%);
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 30%, rgba(232, 160, 180, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(212, 169, 106, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.screen {
    display: none;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.screen.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 2rem 1.2rem;
}

/* Hero */
.hero {
    text-align: center;
    padding: 3rem 1.5rem;
    max-width: 700px;
    margin: 0 auto;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 3.2rem);
    color: var(--deep-rose);
    margin-bottom: 1rem;
    text-shadow: 0 2px 20px rgba(232, 160, 180, 0.3);
    letter-spacing: 2px;
}

.hero-subtitle {
    font-size: clamp(0.95rem, 2.5vw, 1.15rem);
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 2rem;
}

/* Gender Selection */
.gender-selection {
    margin: 2rem 0;
}

.gender-label {
    font-size: 1.15rem;
    color: var(--deep-rose);
    margin-bottom: 1.2rem;
    font-weight: 600;
}

.gender-buttons {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-gender {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.2rem 2.5rem;
    border-radius: var(--radius-lg);
    border: 2px solid rgba(232, 160, 180, 0.3);
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-dark);
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    min-width: 160px;
    backdrop-filter: blur(10px);
}

.btn-gender:hover {
    background: rgba(253, 240, 244, 0.9);
    border-color: var(--primary-pink);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(232, 160, 180, 0.2);
}

.btn-gender.selected {
    background: var(--deep-rose);
    border-color: transparent;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(212, 132, 154, 0.35);
}

.gender-icon {
    font-size: 2rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    font-family: 'Noto Sans JP', sans-serif;
}

.btn-primary {
    background: var(--deep-rose);
    color: white;
    box-shadow: 0 4px 16px rgba(232, 160, 180, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-dark);
    border: 1px solid rgba(232, 160, 180, 0.3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(253, 240, 244, 0.9);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--deep-rose);
    border: 2px solid var(--deep-rose);
}

.btn-outline:hover {
    background: var(--deep-rose);
    color: white;
}

.btn-large {
    padding: 1.1rem 2.5rem;
    font-size: 1.1rem;
    width: 100%;
    max-width: 380px;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(232, 160, 180, 0.08);
}

.question-card {
    max-width: 600px;
    margin: 0 auto;
}

/* Progress */
.progress-container {
    height: 6px;
    background: rgba(232, 160, 180, 0.15);
    border-radius: 3px;
    margin-bottom: 2.5rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary-pink);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Question */
.question-number {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.answer-options {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.answer-btn {
    display: block;
    width: 100%;
    padding: 1rem 1.2rem;
    text-align: left;
    border: 2px solid #f0e0e6;
    border-radius: var(--radius-md);
    background: white;
    cursor: pointer;
    font-size: 0.95rem;
    transition: var(--transition);
    color: var(--text-dark);
    line-height: 1.5;
    font-family: 'Noto Sans JP', sans-serif;
}

.answer-btn:hover {
    border-color: var(--primary-pink);
    background: var(--soft-pink);
    transform: translateX(5px);
}

/* Type Grid */
.type-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
}

.type-btn {
    padding: 0.8rem;
    border: 2px solid #f0e0e6;
    border-radius: var(--radius-md);
    background: white;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    transition: var(--transition);
    color: var(--dark-text);
    font-family: 'Noto Sans JP', sans-serif;
}

.type-btn:hover {
    border-color: var(--primary-pink);
    background: var(--soft-pink);
    transform: scale(1.05);
}

/* Type Browser */
.type-browser-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
    margin: 1.5rem 0;
}

.type-browser-btn {
    padding: 0.7rem 0.5rem;
    border: 2px solid #f0e0e6;
    border-radius: var(--radius-md);
    background: white;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.8rem;
    transition: var(--transition);
    color: var(--dark-text);
    font-family: 'Noto Sans JP', sans-serif;
    text-align: center;
}

.type-browser-btn:hover {
    border-color: var(--primary-pink);
    background: var(--soft-pink);
    transform: scale(1.05);
}

.type-detail-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-top: 1.5rem;
    border: 1px solid rgba(232, 160, 180, 0.15);
}

.type-detail-card h3 {
    color: var(--deep-rose);
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
}

.type-detail-nickname {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

/* Result */
.result-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-soft);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid rgba(232, 160, 180, 0.1);
}

.type-badge {
    display: inline-block;
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--deep-rose);
    background: linear-gradient(135deg, var(--soft-pink), var(--light-gold));
    padding: 0.8rem 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 0.8rem;
    letter-spacing: 3px;
}

.result-nickname {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.result-details {
    text-align: left;
    margin-top: 1.5rem;
}

.result-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(253, 240, 244, 0.4);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary-pink);
}

.result-section h4 {
    color: var(--deep-rose);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.result-section p,
.result-section ul {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.result-section ul {
    padding-left: 1.2rem;
}

.result-section li {
    margin-bottom: 0.3rem;
}

/* Social Share */
.social-share {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    border: none;
    font-family: 'Noto Sans JP', sans-serif;
}

.social-btn.twitter {
    background: #1da1f2;
    color: white;
}

.social-btn.instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: white;
}

.social-btn.copy {
    background: var(--gold);
    color: white;
}

.social-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Compatibility */
.compatibility-input {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.type-select {
    width: 200px;
    padding: 0.8rem;
    border: 2px solid #f0e0e6;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-family: 'Noto Sans JP', sans-serif;
}

/* Spinner */
.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--soft-pink);
    border-top-color: var(--primary-pink);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 1.5rem auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Compatible Types Tags */
.compat-types {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.compat-tag {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: linear-gradient(135deg, var(--soft-pink), var(--light-gold));
    color: var(--dark-text);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.compat-tag-btn {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: linear-gradient(135deg, var(--soft-pink), var(--light-gold));
    color: var(--deep-rose);
    border: 1px solid rgba(232, 160, 180, 0.3);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Noto Sans JP', sans-serif;
}

.compat-tag-btn:hover {
    transform: translateY(-2px);
    background: var(--deep-rose);
    color: white;
    box-shadow: 0 4px 12px rgba(232, 160, 180, 0.3);
}

/* Utilities */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-5 {
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 480px) {

    .type-grid,
    .type-browser-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero {
        padding: 2rem 1rem;
    }

    .card {
        padding: 1.5rem 1rem;
    }

    .result-card {
        padding: 1.5rem 1rem;
    }

    .gender-buttons {
        gap: 0.8rem;
    }

    .btn-gender {
        min-width: 130px;
        padding: 1rem 1.5rem;
    }
}

/* About Screen Specifics */
.about-section {
    margin-bottom: 2rem;
    text-align: left;
}

.about-section h3 {
    color: var(--deep-rose);
    border-bottom: 2px solid var(--accent-gold);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.variant-card {
    background: rgba(253, 240, 244, 0.6);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 0.8rem;
    border-left: 4px solid var(--primary-pink);
}

.variant-title {
    font-weight: 700;
    color: var(--deep-rose);
    margin-bottom: 0.3rem;
    display: flex;
    justify-content: space-between;
}

/* Compatibility Cards */
.compat-types {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.compat-match-card {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
    cursor: pointer;
}

.compat-match-card:active {
    transform: scale(0.98);
}

.compat-match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 0.5rem;
}

.compat-match-score {
    font-weight: bold;
    color: var(--accent-gold);
    font-size: 1.1rem;
}

.compat-match-title {
    font-weight: bold;
    color: var(--deep-rose);
    font-size: 1rem;
}

.compat-match-body {
    font-size: 0.9rem;
    color: #666;
    text-align: left;
    line-height: 1.5;
}

.compat-desc-text {
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.compat-reason-text {
    color: var(--deep-rose);
    font-weight: 500;
    font-size: 0.85rem;
    background: #fff0f5;
    padding: 0.4rem;
    border-radius: 6px;
}

/* Compatibility Ranking UI */
.ranking-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 2rem;
    margin-top: 1rem;
}

.ranking-card {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 16px;
    border: 1px solid rgba(232, 160, 180, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.ranking-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 6px;
    background: transparent;
}

.ranking-card:hover {
    transform: translateX(8px);
    border-color: var(--primary-pink);
    box-shadow: 0 8px 20px rgba(232, 160, 180, 0.15);
}

.rank-badge {
    font-size: 2rem;
    margin-right: 1.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fdf0f4;
    border-radius: 50%;
    flex-shrink: 0;
}

.rank-info {
    flex: 1;
}

.rank-type {
    font-size: 0.8rem;
    font-weight: 800;
    color: #b8860b;
    letter-spacing: 1px;
    margin-bottom: 0.1rem;
}

.rank-nickname {
    font-size: 1.1rem;
    font-weight: 700;
    color: #444;
    line-height: 1.3;
}

/* Rank specific aesthetics */
.rank-1st {
    background: linear-gradient(135deg, #fffdf0 0%, #ffffff 100%);
    border: 2px solid #ffe88a !important;
}

.rank-1st::before {
    background: #ffcc00;
}

.rank-1st .rank-badge {
    background: #fff5cc;
    font-size: 2.2rem;
}

.rank-2nd {
    background: linear-gradient(135deg, #f9f9f9 0%, #ffffff 100%);
}

.rank-2nd::before {
    background: #c0c0c0;
}

.rank-2nd .rank-badge {
    background: #f0f0f0;
}

.rank-3rd {
    background: linear-gradient(135deg, #fffcf9 0%, #ffffff 100%);
}

.rank-3rd::before {
    background: #cd7f32;
}

.rank-3rd .rank-badge {
    background: #fff1e5;
}

.rank-1st .rank-nickname {
    color: #8a6d00;
    font-size: 1.25rem;
}

.rank-1st .rank-type {
    color: #d4af37;
}