:root {
    --shiba-gold: #DAA520;
    --shiba-gold-dark: #B8860B;
    --shiba-red: #B22222;
    --shiba-red-light: #CD5C5C;
    --shiba-bg: #FDF5E6; /* OldLace - 柔らかな和の白 */
    --shiba-text: #2F4F4F;
    --shiba-card-bg: rgba(255, 255, 255, 0.95);
    --glass-effect: blur(10px);
    --accent-color: #8B4513; /* SaddleBrown */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    background-color: var(--shiba-bg);
    color: var(--shiba-text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

h1, h2, h3, .japanese-title {
    font-family: 'Shippori Mincho', serif;
    font-weight: 700;
}

.app-container {
    max-width: 500px;
    margin: 30px auto;
    padding: 40px 20px;
    min-height: calc(100vh - 60px);
    position: relative;
    background-image: radial-gradient(circle at 10% 10%, rgba(218, 165, 32, 0.05) 0%, transparent 20%),
                      radial-gradient(circle at 90% 90%, rgba(178, 34, 34, 0.05) 0%, transparent 20%);
}

.screen {
    display: none;
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.screen.active {
    display: block;
}

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

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    font-size: 4rem;
    margin-bottom: 10px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
    display: inline-block;
    animation: bounce 2s infinite ease-in-out;
}

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

h1 {
    font-size: 1.8rem;
    color: var(--shiba-red);
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 0.85rem;
    color: var(--shiba-gold-dark);
    font-weight: bold;
    margin-bottom: 20px;
}

.usage-guide {
    margin-top: 15px;
    padding: 10px 15px;
    background: rgba(218, 165, 32, 0.08);
    border-radius: 12px;
    display: inline-block;
}

.usage-guide p {
    font-size: 0.85rem;
    color: var(--shiba-text);
    line-height: 1.5;
}

/* Input Section */
.input-section {
    margin-bottom: 30px;
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 0.9rem;
    text-align: center;
}

input[type="text"] {
    width: 100%;
    padding: 15px;
    border: 2px solid #E0D0B0;
    border-radius: 12px;
    font-size: 1.1rem;
    text-align: center;
    background: white;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--shiba-gold);
    box-shadow: 0 0 10px rgba(218, 165, 32, 0.2);
}

/* Upload Area */
.upload-area {
    width: 100%;
    aspect-ratio: 1 / 1;
    min-height: 350px; /* aspect-ratio非対応ブラウザ用フォールバック */
    border: 3px dashed #E0D0B0;
    border-radius: 24px;
    display: grid;
    place-items: center;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    background: #fff;
    transition: all 0.3s ease;
    margin-bottom: 40px;
}

.upload-area:hover {
    border-color: var(--shiba-gold);
    background-color: rgba(218, 165, 32, 0.02);
}

.upload-area.dragover {
    border-color: var(--shiba-red);
    background-color: rgba(178, 34, 34, 0.05);
}

.upload-placeholder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    padding: 0;
    margin: 0;
    z-index: 1;
}

.placeholder-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.upload-area:hover .placeholder-img {
    opacity: 0.9;
    transform: scale(1.02);
}

.upload-instruction {
    position: relative;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--shiba-red);
    padding: 20px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    width: 85%;
    max-width: 260px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    pointer-events: none;
    text-align: center;
}

.upload-instruction i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.upload-instruction p {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 8px;
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

.upload-instruction span {
    font-size: 0.75rem;
    opacity: 0.9;
}

.upload-area:hover .upload-instruction {
    background: rgba(255, 255, 255, 0.2);
}

#preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

/* Buttons */
.btn-primary {
    display: block;
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--shiba-red), #8B0000);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 6px 15px rgba(178, 34, 34, 0.3);
    transition: all 0.3s ease;
    font-family: 'Shippori Mincho', serif;
}

.btn-primary:active {
    transform: scale(0.98);
    box-shadow: 0 3px 8px rgba(178, 34, 34, 0.3);
}

.btn-secondary {
    display: block;
    width: 100%;
    padding: 15px;
    background: transparent;
    color: var(--shiba-text);
    border: 2px solid var(--shiba-gold);
    border-radius: 12px;
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 20px;
}

/* Loading Screen */
#screen-loading {
    display: none;
    text-align: center;
    justify-content: center;
    flex-direction: column;
    padding-top: 100px;
}

#screen-loading.active {
    display: flex;
}

.pulse-animation {
    width: 80px;
    height: 80px;
    background: var(--shiba-gold);
    border-radius: 50%;
    margin: 0 auto 30px;
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(0.8); opacity: 0.5; box-shadow: 0 0 0 0 rgba(218, 165, 32, 0.5); }
    70% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 0 20px rgba(218, 165, 32, 0); }
    100% { transform: scale(0.8); opacity: 0.5; }
}

.loading-text {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--shiba-red);
    margin-bottom: 10px;
}

.loading-subtext {
    font-size: 0.8rem;
    color: var(--shiba-gold-dark);
    font-style: italic;
}

/* Result Screen */
.result-header {
    margin-bottom: 30px;
}

/* --- LP (Landing Page) Styles --- */
.lp-body {
    background-color: var(--shiba-bg);
}

.lp-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 60px 20px;
    text-align: center;
}

.lp-header {
    margin-bottom: 40px;
}

.lp-logo {
    font-size: 3.5rem;
    margin-bottom: 15px;
}

.lp-subtitle {
    font-family: 'Shippori Mincho', serif;
    font-size: 1.1rem;
    color: var(--shiba-gold-dark);
    margin-top: 10px;
}

.lp-hero {
    margin-bottom: 40px;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.lp-hero-img {
    width: 100%;
    display: block;
}

.lp-content h2 {
    font-size: 1.5rem;
    color: var(--shiba-red);
    margin-bottom: 20px;
    line-height: 1.4;
}

.lp-content .description {
    font-size: 0.95rem;
    color: var(--shiba-text);
    margin-bottom: 40px;
}

.lp-content .description span {
    display: block;
    font-size: 0.75rem;
    margin-top: 10px;
    opacity: 0.7;
}

/* HubSpot Form Container */
.hubspot-form-container {
    background: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    margin: 20px 0 40px;
    border: 1px solid #E0D0B0;
    min-height: 300px;
    overflow: visible; /* フォームがはみ出しても表示されるように */
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* HubSpot 独自のスタイルを補正 */
.hbspt-form {
    width: 100%;
}

/* HubSpot デフォルトの送信ボタンを非表示に */
.hs-submit, .hs-button {
    display: none !important;
}

/* CTA Buttons */
.lp-cta-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 60px;
}

.lp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    border-radius: 16px;
    font-weight: bold;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    width: 100%;
    margin: 0;
}

.email-btn {
    background: linear-gradient(135deg, var(--shiba-gold), var(--shiba-gold-dark));
    color: white;
    border: none;
}

.line-btn {
    background: #00B900;
    color: white;
}

.lp-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

/* Footer Profile */
.lp-footer {
    border-top: 1px solid #E0D0B0;
    padding-top: 40px;
    margin-top: 40px;
}

.profile p {
    margin-bottom: 5px;
}

.creator {
    font-weight: bold;
    color: var(--shiba-red);
}

.bio {
    font-size: 0.85rem;
    color: var(--shiba-gold-dark);
}

@media (max-width: 480px) {
    .lp-container {
        padding: 40px 15px;
    }
    .lp-content h2 {
        font-size: 1.3rem;
    }
}

.result-img-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

#result-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#result-title {
    font-size: 1.4rem;
    text-align: center;
    color: var(--shiba-red);
    position: relative;
    padding-bottom: 15px;
}

#result-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--shiba-gold);
}

.diagnosis-content {
    background: var(--shiba-card-bg);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    margin-bottom: 40px;
    border-left: 5px solid var(--shiba-gold);
}

.diagnosis-content h2 {
    font-size: 1.3rem;
    color: var(--shiba-red);
    margin-bottom: 20px;
    text-align: center;
}

.diagnosis-content h3 {
    font-size: 1rem;
    color: var(--shiba-gold-dark);
    margin: 25px 0 10px;
    display: flex;
    align-items: center;
}

.diagnosis-content h3::before {
    content: '🐾';
    margin-right: 8px;
    font-size: 0.9rem;
}

.diagnosis-content p {
    font-size: 0.95rem;
    margin-bottom: 15px;
    color: #444;
}

/* Share Section */
.share-section {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #E0D0B0;
}

.share-title {
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.share-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.share-btn.x { background: #000; }
.share-btn.instagram { background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D); }
.share-btn.line { background: #00B900; }

.share-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Responsive */
@media (max-width: 480px) {
    .app-container {
        margin: 0;
        padding: 20px;
        min-height: 100vh;
    }
}
