@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

:root {
    --google-green: #01875f;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --surface: #ffffff;
    --border: #dadce0;
    --shadow: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: var(--surface);
    color: var(--text-primary);
    max-width: 360px;
    margin: 0 auto;
    overflow-x: hidden;
    line-height: 1.4;
}

/* Header Section */
header {
    padding: 20px 16px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.app-icon {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    box-shadow: 0 1px 3px var(--shadow);
    object-fit: cover;
}

.app-info {
    flex: 1;
}

.app-title {
    font-size: 22px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.verified-badge {
    width: 16px;
    height: 16px;
}

.developer {
    font-size: 14px;
    color: var(--google-green);
    font-weight: 500;
}

.tagline {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Stats Section */
.stats {
    display: flex;
    justify-content: space-between;
    padding: 0 16px 20px;
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.stat-item {
    flex: 1;
}

.stat-value {
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.editors-choice {
    color: #444;
    font-weight: 500;
}

/* Action Section */
.actions {
    padding: 20px 16px;
}

#installBtn {
    width: 100%;
    background-color: var(--google-green);
    color: white;
    border: none;
    padding: 10px 0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: none;
}

#installBtn:active {
    background-color: #016346;
}

#installBtn.progress-mode {
    background-color: #e8f0fe;
    color: var(--google-green);
    border: 1px solid var(--google-green);
    position: relative;
    overflow: hidden;
}

.progress-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background-color: rgba(1, 135, 95, 0.1);
    width: 0%;
    transition: width 0.1s linear;
}

.progress-text {
    position: relative;
    z-index: 2;
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal {
    background: white;
    width: 85%;
    max-width: 300px;
    border-radius: 24px;
    overflow: hidden;
    padding: 24px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.modal-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.modal-title {
    font-size: 16px;
    font-weight: 500;
}

.modal-body {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.modal-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: none;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    background: transparent;
}

.btn-cancel {
    color: var(--google-green);
}

.btn-install {
    background-color: var(--google-green);
    color: white;
}

/* Screenshots / Content */
.content-section {
    padding: 20px 16px;
}

.section-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 12px;
}

.screenshot-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.screenshot-scroll::-webkit-scrollbar {
    display: none;
}

.screenshot {
    min-width: 140px;
    height: 240px;
    background: #f1f3f4;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9aa0a6;
    font-size: 12px;
}

/* Secondary Actions */
.secondary-actions {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding: 0 16px 20px;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--google-green);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.device-availability {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    color: var(--text-secondary);
    font-size: 14px;
    border-top: 1px solid #eee;
    margin-bottom: 20px;
}

.device-availability svg {
    min-width: 20px;
}

/* Toast Notification */
#installToast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #e1e3e4;
    color: #202124;
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 13px;
    display: none;
    z-index: 2000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    white-space: nowrap;
}

/* Final State Styling */
.btn-open {
    background-color: var(--google-green) !important;
    color: white !important;
    border: none !important;
}

