
:root {
    --primary-color: #00c853; /* LINE Green-ish or Success Green */
    --accent-color: #2962ff; /* Trustworthy Blue */
    --text-dark: #333333;
    --text-gray: #666666;
    --bg-color: #f5f7fa;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 380px; /* Mobile width cap */
    background: rgba(255, 255, 255, 0.95); /* Semi-transparent white to show bg context */
    border-radius: 20px;
    padding: 30px 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    backdrop-filter: blur(10px);
    background-image: url('../imgs/bgc.png'); /* Fallback or specific container bg */
    background-size: cover;
    background-position: center;
}

/* Logo / Header Area */
.logo-area {
    margin-bottom: 20px;
}

.logo-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 10px;
    box-shadow: 0 4px 10px rgba(41, 98, 255, 0.3);
}

h1 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(to right, var(--accent-color), #00c853);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.5;
    margin-bottom: 30px;
}

/* Input Form */
.input-group {
    width: 100%;
    margin-bottom: 25px;
    position: relative;
    z-index: 5;
}

input[type="text"] {
    width: 100%;
    padding: 15px 15px;
    font-size: 15px;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    text-align: center;
    background: rgba(255,255,255,0.9);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

input[type="text"]:focus {
    border-color: var(--accent-color);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(41, 98, 255, 0.2);
}

/* Main Button */
.btn-diagnose {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, var(--accent-color), #0039cb);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(41, 98, 255, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
    z-index: 5;
    letter-spacing: 1px;
}

.btn-diagnose:active {
    transform: scale(0.98);
}

.btn-diagnose::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    20% { left: 100%; }
    100% { left: 100%; }
}

/* Footer / Disclaimer */
.footer {
    margin-top: 40px;
    font-size: 10px;
    color: #999;
    text-align: left;
    line-height: 1.6;
    background: #f0f2f5;
    padding: 15px;
    border-radius: 10px;
}

.footer p {
    margin-bottom: 8px;
}

.footer-links {
    margin-top: 15px;
    border-top: 1px solid #e0e0e0;
    padding-top: 10px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 11px;
}

.footer-links a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white url('../imgs/popbgc.png') no-repeat center center;
    background-size: cover;
    width: 85%;
    max-width: 320px;
    padding: 30px 20px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

/* Ensure text is readable on top of bg image */
.modal-content > * {
    position: relative;
    z-index: 2;
}

/* Optional: Add a white overlay if the image is too busy, 
   or assume the user followed the 'clean center' prompt */
.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.85); /* Adjust opacity as needed */
    border-radius: 20px;
    z-index: 1;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

/* Progress Circle */
.progress-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
}

.progress-svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.progress-circle-bg {
    fill: none;
    stroke: #eee;
    stroke-width: 8;
}

.progress-circle-fg {
    fill: none;
    stroke: var(--accent-color);
    stroke-width: 8;
    stroke-dasharray: 283; /* 2 * PI * 45 */
    stroke-dashoffset: 283;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.1s linear;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: bold;
    color: var(--accent-color);
}

.analyzing-text {
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.analyzing-sub {
    font-size: 12px;
    color: var(--text-gray);
}

/* Success Modal Styles */
.success-icon {
    font-size: 50px;
    color: #00c853;
    margin-bottom: 15px;
}

.success-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.success-desc {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 25px;
}

.btn-line {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 15px;
    background-color: #06C755; /* Official LINE Green */
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 50px;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(6, 199, 85, 0.4);
    transition: opacity 0.2s;
}

.btn-line:hover {
    opacity: 0.9;
}

.btn-line img {
    width: 24px;
    margin-right: 10px;
    filter: brightness(0) invert(1);
}

/* Pulse animation for LINE button */
@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(6, 199, 85, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(6, 199, 85, 0); }
    100% { box-shadow: 0 0 0 0 rgba(6, 199, 85, 0); }
}

.btn-line-pulse {
    animation: pulse-green 2s infinite;
}

