/* 
================================
MOBILE FIRST STYLES
================================
*/
:root {
    --primary-color: #1a73e8;
    --text-dark: #202124;
    --text-gray: #5f6368;
    --border-color: #dadce0;
    --bg-light: #f8f9fa;
}

/* --- General --- */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #ffffff;
    color: var(--text-dark);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* --- Manual Page --- */
.manual-container {
    max-width: 100%;
    margin: 0 auto;
}

.manual-header {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    text-align: center;
}

.manual-header h1 {
    margin: 0 0 15px 0;
    font-size: 22px;
    font-weight: 600;
}

.header-button {
    display: inline-block;
    padding: 12px 28px;
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.header-button:active {
    transform: scale(0.96);
}

.manual-content {
    padding: 20px;
}

.intro-section {
    margin-bottom: 25px;
    padding: 15px;
    background: var(--bg-light);
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

.intro-section p {
    margin: 0;
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.7;
}

.steps-section {
    margin-bottom: 25px;
}

.steps-section > h2 {
    font-size: 18px;
    margin: 0 0 15px 0;
    color: var(--text-dark);
}

.step-item {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.step-item:last-child {
    border-bottom: none;
}

.step-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
}

.step-content h3 {
    margin: 0 0 6px 0;
    font-size: 15px;
    color: var(--text-dark);
    font-weight: 600;
}

.step-content p {
    margin: 0;
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.6;
}

.tips-section {
    padding: 15px;
    background: #fff9e6;
    border-left: 3px solid #ffc107;
    border-radius: 4px;
}

.tips-section h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: var(--text-dark);
}

.tips-section ul {
    margin: 0;
    padding-left: 18px;
}

.tips-section li {
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 6px;
    line-height: 1.6;
}

.ad-section {
    margin-top: 25px;
    min-height: 50px;
}

#ad_container {
    width: 100%;
    min-height: 50px;
}

/* --- index.html --- */
body.image-viewer {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.header {
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px 15px;
    box-shadow: 0 1px 2px var(--shadow-color);
    z-index: 1000;
    flex-shrink: 0;
    border-radius: 8px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.header .title {
    font-size: 1.1rem;
    font-weight: 700;
}

#languageSelect {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: transparent;
    font-size: 0.85rem;
    max-width: 130px;
}

.header-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.navigation {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(0,0,0,0.05);
    padding: 4px;
    border-radius: 8px;
}

.btn {
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 12px;
    transition: all 0.2s ease;
    background-color: var(--primary-color);
    color: white;
}

.download-btn {
    background-color: var(--secondary-color);
}

.btn:disabled {
    background-color: #c8c8cd;
    cursor: not-allowed;
}

.page-info {
    font-size: 0.9rem;
    color: var(--text-color);
    min-width: 50px;
    text-align: center;
    font-weight: 500;
}

.image-container {
    flex-grow: 1;
    overflow-y: auto;
    background: #e9ecef;
    -webkit-overflow-scrolling: touch;
    padding: 15px;
    box-sizing: border-box;
}

.page-image {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto 15px;
    box-shadow: 0 4px 12px var(--shadow-color);
    border-radius: 8px;
}

.loading {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    font-size: 1rem;
    font-weight: 500;
}

/* 
================================
TABLET & DESKTOP STYLES
================================
*/
/* 
================================
TABLET & DESKTOP STYLES
================================
*/
@media (min-width: 601px) {
    .manual-container {
        max-width: 800px;
    }

    .manual-header {
        padding: 35px 40px;
    }

    .manual-header h1 {
        font-size: 28px;
        margin-bottom: 18px;
    }

    .header-button {
        padding: 14px 36px;
        font-size: 16px;
    }

    .header-button:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        transform: translateY(-2px);
    }

    .manual-content {
        padding: 35px;
    }

    .intro-section {
        padding: 20px;
    }

    .intro-section p {
        font-size: 15px;
    }

    .steps-section > h2 {
        font-size: 20px;
        margin-bottom: 18px;
    }

    .step-number {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .step-content h3 {
        font-size: 16px;
    }

    .step-content p {
        font-size: 15px;
    }

    .tips-section {
        padding: 20px;
    }

    .tips-section h3 {
        font-size: 17px;
    }

    .tips-section li {
        font-size: 14px;
    }
}

/* --- image.html --- */
body.image-viewer {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 10px 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    flex-shrink: 0;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.header .title {
    font-size: 1.1rem;
    font-weight: 600;
}

#languageSelect {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: white;
    font-size: 0.85rem;
    max-width: 130px;
}

.header-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.navigation {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(0,0,0,0.05);
    padding: 4px;
    border-radius: 8px;
}

.btn {
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 12px;
    transition: all 0.2s ease;
    background-color: var(--primary-color);
    color: white;
}

.download-btn {
    background-color: #34a853;
}

.btn:disabled {
    background-color: #c8c8cd;
    cursor: not-allowed;
}

.btn:active {
    transform: scale(0.95);
}

.page-info {
    font-size: 0.9rem;
    color: var(--text-dark);
    min-width: 50px;
    text-align: center;
    font-weight: 500;
}

.image-container {
    flex-grow: 1;
    overflow-y: auto;
    background: #f5f5f5;
    -webkit-overflow-scrolling: touch;
    padding: 15px;
    box-sizing: border-box;
}

.page-image {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.loading {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    font-size: 1rem;
    font-weight: 500;
}

@media (min-width: 601px) {
    .header {
        padding: 12px 20px;
    }
    
    .header-top {
        margin-bottom: 12px;
    }

    .header .title {
        font-size: 1.25rem;
    }

    #languageSelect {
        padding: 8px 12px;
        font-size: 0.9rem;
        max-width: 180px;
    }

    .header-bottom {
        justify-content: center;
        gap: 15px;
    }

    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .page-info {
        font-size: 1rem;
        min-width: 60px;
    }
}
