:root {
    --primary-color: #68548e;
    --text-color: #333;
    --secondary-text-color: #666;
    --background-color: #f5f5f7;
    --card-background: #ffffff;
    --border-radius: 16px;
    --spacing-unit: 16px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
    padding-bottom: 80px; /* Space for bottom bar */
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--card-background);
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

/* Header */
.app-header {
    padding: 32px var(--spacing-unit);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: linear-gradient(180deg, #f8f8fa 0%, #ffffff 100%);
}

.app-icon img {
    width: 100px;
    height: 100px;
    border-radius: 22px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    margin-bottom: 16px;
}

.app-info h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.subtitle {
    font-size: 14px;
    color: var(--secondary-text-color);
    margin-bottom: 12px;
}

.tags {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.tag {
    font-size: 12px;
    color: var(--secondary-text-color);
    background-color: #f0f0f2;
    padding: 4px 8px;
    border-radius: 6px;
}

/* Slogan */
.slogan-section {
    padding: var(--spacing-unit);
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.slogan-section h2 {
    font-size: 18px;
    color: var(--primary-color);
    font-weight: 600;
}

/* Description */
.description-section {
    padding: 24px var(--spacing-unit);
}

.description-section h3, .about-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.description-section p {
    font-size: 15px;
    color: var(--text-color);
    margin-bottom: 16px;
}

.feature-list {
    list-style: none;
    padding-left: 0;
}

.feature-list li {
    font-size: 14px;
    color: var(--secondary-text-color);
    margin-bottom: 8px;
    position: relative;
    padding-left: 16px;
}

.feature-list li::before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Screenshots */
.screenshots-section {
    padding: 0 0 24px 0;
    overflow: hidden;
}

.screenshots-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 0 var(--spacing-unit);
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE 10+ */
}

.screenshots-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.screenshots-container img {
    width: 160px; /* Adjust based on aspect ratio */
    height: 284px; /* 9:16 ratio approx */
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    object-fit: cover;
    flex-shrink: 0;
}

/* About */
.about-section {
    padding: 24px var(--spacing-unit);
    border-top: 1px solid #f0f0f0;
}

.about-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-item .label {
    font-size: 12px;
    color: var(--secondary-text-color);
    margin-bottom: 4px;
}

.detail-item .value {
    font-size: 14px;
    font-weight: 500;
}

/* Channel Grid - 图文混排 */
.channel-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    width: 100%;
}

.channel-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 12px 16px;
    background-color: #f8f8fa;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s ease;
    border: 1px solid transparent;
    flex: 0 0 calc(50% - 5px);
}

.channel-item:hover {
    background-color: #f0f0f2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.channel-item:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.channel-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-right: 12px;
    border-radius: 8px;
    background-color: #fff;
    flex-shrink: 0;
}

.channel-icon svg {
    display: block;
}

.channel-icon.apple-icon {
    color: #000;
}

.channel-icon.huawei-icon {
    color: #E72323;
}

.channel-icon.yyb-icon {
    background-color: #fff;
}

.channel-icon.vivo-icon {
    color: #0066CC;
}

.channel-icon.xiaomi-icon {
    color: #FF6900;
}

.channel-icon.honor-icon {
    color: #0D5FFF;
}

.channel-icon.oppo-icon {
    background-color: #fff;
}

.channel-text {
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    line-height: 1.3;
}

/* Bottom Bar - Fixed with Background */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    padding: 12px var(--spacing-unit);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: center;
    z-index: 1000;
    transform: none; /* Reset transform */
    border-top: 1px solid #eee;
}

.download-btn {
    display: block;
    width: 100%;
    max-width: 480px; /* Smaller than container (600px) */
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 12px 0; /* Slightly smaller height */
    border-radius: 32px;
    text-decoration: none;
    font-size: 16px; /* Slightly smaller font */
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(104, 84, 142, 0.3);
    transition: transform 0.2s active, box-shadow 0.2s;
}

.download-btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 6px rgba(104, 84, 142, 0.3);
}

@media (min-width: 600px) {
    body {
        background-color: #e0e0e5;
        padding-bottom: 0;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .container {
        height: auto;
        min-height: auto;
        border-radius: 24px;
        margin: 40px auto;
        padding-bottom: 100px; /* Space for bottom bar */
        position: relative;
        overflow: hidden;
    }

    /* On desktop, keep the bottom bar fixed to the viewport bottom as requested.
       It will span the full width of the window. */
    .bottom-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        border-radius: 0; /* No rounded corners for full width bar */
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center; /* Center on desktop */
    z-index: 2000;
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    background-color: white;
    width: 100%;
    max-width: 400px; /* Limit width on desktop */
    border-radius: 24px 24px 0 0; /* Rounded top corners for mobile sheet */
    position: absolute;
    bottom: 0; /* Sheet style on mobile */
    padding: 24px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    animation: slideUp 0.3s ease-out;
}

@media (min-width: 600px) {
    .modal-content {
        border-radius: 24px; /* Fully rounded on desktop */
        position: relative;
        bottom: auto;
        box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

.close-btn {
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.channel-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    border: 2px solid #000;
    border-radius: 30px;
    text-decoration: none;
    color: #000;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.2s;
    position: relative;
}

.channel-btn:hover {
    background-color: #f9f9f9;
}

.channel-btn .icon {
    margin-right: 10px;
    display: flex;
    align-items: center;
}

.channel-btn svg {
    width: 24px;
    height: 24px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
