/* styles.css */
:root {
    /* 默认/浅色模式变量 */
    --bg-color: #f8f8f8;
    --container-bg: #ffffff;
    --text-color: #1f2937;
    --heading-color: #111827;
    --primary-color: #4CAF50; /* Green */
    --primary-hover: #45a049;
    --accent-color: #3b82f6; /* Blue (For calculation) */
    --pro-color: #FFB300; /* Gold/Amber (For Pro features) */
    --pro-hover: #e09b00;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --border-color: #e5e7eb;
}

/* Dark Mode Adaptation */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1f2937;
        --container-bg: #374151;
        --text-color: #f3f4f6;
        --heading-color: #ffffff;
        --shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
        --border-color: #4b5563;
    }
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
    background-color: var(--container-bg);
    padding: 35px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    box-sizing: border-box; 
}

h1 {
    text-align: center;
    color: var(--heading-color);
    margin-bottom: 5px;
}

.description {
    text-align: center;
    color: #6b7280;
    margin-bottom: 30px;
    font-size: 1rem;
}

h2 {
    color: var(--heading-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    margin-top: 30px;
}

/* Subscription Module Banner */
.pro-upgrade-banner {
    text-align: center;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #fceb9c 0%, #ffc107 100%); /* Gold/Yellow gradient */
    color: #111827;
    box-shadow: 0 8px 15px rgba(255, 193, 7, 0.4);
}
.pro-upgrade-banner h2 {
    border-bottom: none;
    margin-top: 0;
    color: #111827;
    font-size: 1.5rem;
}
.pro-upgrade-banner p {
    margin: 5px 0 15px 0;
    font-weight: 500;
}
.pro-cta-button {
    background-color: #f44336 !important; /* Standout Red CTA */
    color: white !important;
    font-size: 1.1rem;
    padding: 12px 25px;
    width: auto !important;
    display: inline-block !important;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s;
}
.pro-cta-button:hover {
    background-color: #d32f2f !important;
}


/* Instructions Style */
.instructions {
    background-color: rgba(60, 179, 113, 0.1); 
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 5px solid var(--primary-color);
}
.instructions h3 {
    margin-top: 0;
    color: var(--primary-color);
}
.instructions p {
    margin: 5px 0;
    font-size: 0.95rem;
}

/* Inputs and Buttons */
input[type="time"] {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--container-bg);
    color: var(--text-color);
    font-size: 1rem;
}

button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 20px;
    transition: background-color 0.2s, transform 0.1s;
}

button:hover {
    transform: translateY(-1px);
}

/* Main Calc Button Style */
.section button {
    background-color: var(--accent-color);
    color: white;
}
.section button:hover {
    background-color: #3371e2;
}

/* Results Display */
.results {
    margin-top: 20px;
    padding: 15px 0;
    border-top: 1px dashed var(--border-color);
}

.results h3 {
    margin-top: 0;
    font-size: 1.1rem;
    color: var(--accent-color);
}

ul {
    list-style-type: none;
    padding: 0;
}

li {
    font-size: 1.2rem;
    color: var(--text-color);
    margin: 10px 0;
    padding: 8px 15px;
    background-color: rgba(147, 197, 253, 0.1); 
    border-radius: 4px;
    border-left: 4px solid var(--accent-color);
    display: flex;
    justify-content: space-between;
}
.duration-info {
    font-size: 0.9rem;
    color: #6b7280;
    align-self: center;
}
@media (prefers-color-scheme: dark) {
    li {
        background-color: rgba(59, 130, 246, 0.2); 
    }
}


/* --- Pro Tips Section (Locked Content) --- */

.pro-tips-section {
    position: relative;
    margin-top: 40px;
    padding: 20px;
    border: 2px solid var(--pro-color);
    border-radius: 12px;
    transition: all 0.5s ease;
}

.pro-tips-section.locked .pro-content {
    /* 对内容进行模糊和变灰处理 */
    filter: blur(4px) grayscale(100%);
    opacity: 0.6;
    pointer-events: none; /* 无法点击内部链接 */
    transition: all 0.5s ease;
}

.pro-tips-section.locked::after {
    /* 覆盖层，显示锁定信息和解锁按钮 */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(var(--container-bg), 0.7); /* 半透明背景 */
    backdrop-filter: blur(5px);
    border-radius: 10px;
    z-index: 10;
}

.lock-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 20;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--heading-color);
    padding: 20px;
    max-width: 80%;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.pro-tips-section h2 i {
    color: var(--pro-color);
    margin-right: 10px;
}
.pro-tips-section ul {
    margin-top: 15px;
    padding-left: 20px;
    list-style-type: disc;
}
.pro-tips-section ul li {
    background: none;
    border-left: none;
    padding: 5px 0;
    font-size: 1rem;
    display: list-item;
}
.pro-tips-section .unlock-button {
    /* 放置在锁定信息下方 */
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
}
@media (max-width: 500px) {
    .lock-message {
        font-size: 1rem;
    }
}


/* --- Share Module Style --- */

.share-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.share-button {
    background-color: var(--accent-color);
    color: white;
    max-width: 200px;
    margin: 10px auto;
    display: block;
}
.share-button:hover {
    background-color: #3371e2;
}

.share-options {
    margin-top: 15px;
    padding: 15px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    display: none; 
}
.share-options input[type="text"] {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px dashed var(--accent-color);
    background-color: var(--container-bg);
    color: var(--text-color);
    font-size: 0.9rem;
}
.share-options button {
    background-color: #f97316; 
    color: white;
    max-width: 100px;
    margin: 0;
    padding: 8px 15px;
    display: inline-block;
}
.share-options button:hover {
    background-color: #ea580c;
}

/* FAQ Style */
.faq-section {
    margin-top: 40px;
}
details {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--bg-color);
}
summary {
    font-weight: bold;
    cursor: pointer;
    padding: 5px 0;
    outline: none;
}
details p {
    margin-top: 10px;
    padding-top: 5px;
    border-top: 1px dashed var(--border-color);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Mobile Adaptation */
@media (max-width: 500px) {
    body {
        padding: 10px;
    }
    .container {
        padding: 20px;
        margin: 0;
        border-radius: 0; 
    }
    li {
        font-size: 1.1rem;
        flex-direction: column; /* Stacking results on small screens */
    }
    .duration-info {
        align-self: flex-start;
        margin-top: 5px;
    }
    .pro-cta-button {
        font-size: 1rem;
        padding: 10px 20px;
    }
}
