* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Roboto, RobotoDraft, Helvetica, Arial, sans-serif;
    background: white;
    color: rgba(0, 0, 0, 0.87);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-size-adjust: 100%;
}

/* Header */
.header {
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    padding: 16px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.back-button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: rgba(0, 0, 0, 0.6);
    transition: color 0.2s;
}

.back-button:hover {
    color: rgba(0, 0, 0, 0.87);
}

.header-title {
    font-size: 18px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.87);
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* App Header Section */
.app-header {
    background: white;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

.app-info {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.app-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, #2962ff, #1976d2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 2px 8px rgba(41, 98, 255, 0.3);
}

.app-icon::before {
    content: "📱";
    font-size: 40px;
}

.app-icon::after {
    content: "⬇️";
    position: absolute;
    bottom: -5px;
    right: -5px;
    font-size: 16px;
    background: #2962ff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-details {
    flex: 1;
}

.app-name {
    font-size: 24px;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.87);
    margin-bottom: 8px;
}

.app-category {
    color: rgba(0, 0, 0, 0.6);
    font-size: 14px;
    margin-bottom: 8px;
}

.app-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.stars {
    color: #ffc107;
    font-size: 16px;
}

.rating-text {
    color: rgba(0, 0, 0, 0.6);
    font-size: 14px;
}

.install-button {
    background: #2962ff;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(41, 98, 255, 0.3);
}

.install-button:hover {
    background: #1976d2;
    box-shadow: 0 4px 8px rgba(41, 98, 255, 0.4);
}

.install-button:disabled {
    background: rgba(0, 0, 0, 0.12);
    color: rgba(0, 0, 0, 0.38);
    cursor: not-allowed;
    box-shadow: none;
}

.install-button.loading {
    background: #2962ff;
    cursor: not-allowed;
    position: relative;
}

.install-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Description Section */
.description {
    background: white;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

.description h3 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 16px;
    color: rgba(0, 0, 0, 0.87);
}

.description p {
    color: rgba(0, 0, 0, 0.6);
    line-height: 1.6;
    margin-bottom: 16px;
}

/* Features Section */
.features {
    background: white;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

.features h3 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 16px;
    color: rgba(0, 0, 0, 0.87);
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 4px;
}

.feature-icon {
    font-size: 24px;
    width: 40px;
    text-align: center;
}

.feature-text {
    flex: 1;
}

.feature-name {
    font-weight: 500;
    color: rgba(0, 0, 0, 0.87);
    margin-bottom: 4px;
}

.feature-desc {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.6);
}

/* Screenshots Section */
.screenshots-section {
    background: white;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

.screenshots-section h3 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 16px;
    color: rgba(0, 0, 0, 0.87);
}

.screenshots-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.screenshots-slider {
    display: flex;
    transition: transform 0.3s ease;
    gap: 16px;
}

.screenshot-item {
    flex: 0 0 auto;
    width: 200px;
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.screenshot-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10;
}

.slider-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: background 0.2s;
}

.dot.active {
    background: #2962ff;
}

.dot:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* Install Banner */
.install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
    padding: 16px 20px;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 100;
}

.install-banner.show {
    transform: translateY(0);
}

.banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.banner-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2962ff, #1976d2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 2px 8px rgba(41, 98, 255, 0.3);
}

.banner-icon::before {
    content: "📱";
    font-size: 24px;
}

.banner-icon::after {
    content: "⬇️";
    position: absolute;
    bottom: -3px;
    right: -3px;
    font-size: 12px;
    background: #2962ff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-text {
    flex: 1;
}

.banner-title {
    font-size: 16px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.87);
    margin-bottom: 4px;
}

.banner-subtitle {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.6);
}

.banner-install {
    background: #2962ff;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(41, 98, 255, 0.3);
    transition: background 0.2s, box-shadow 0.2s;
}

.banner-install:hover {
    background: #1976d2;
    box-shadow: 0 4px 8px rgba(41, 98, 255, 0.4);
}

.banner-install:disabled {
    background: rgba(0, 0, 0, 0.12);
    color: rgba(0, 0, 0, 0.38);
    cursor: not-allowed;
    box-shadow: none;
}

.banner-install.loading {
    background: #2962ff;
    cursor: not-allowed;
    position: relative;
}

.banner-install.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.banner-close {
    background: none;
    border: none;
    font-size: 20px;
    color: rgba(0, 0, 0, 0.6);
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s;
}

.banner-close:hover {
    color: rgba(0, 0, 0, 0.87);
}

/* iOS Instructions Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    animation: fadeIn 0.3s;
}

.modal-overlay.active {
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.ios-modal {
    background: white;
    border-radius: 16px 16px 0 0;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    animation: slideUp 0.3s;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 20px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.87);
}

.close-btn {
    background: rgba(0, 0, 0, 0.04);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(0, 0, 0, 0.6);
    transition: background 0.2s, color 0.2s;
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: rgba(0, 0, 0, 0.87);
}

.instruction-step {
    margin-bottom: 20px;
    text-align: left;
    display: flex;
    gap: 12px;
}

.step-number {
    background: #2962ff;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 14px;
    flex-shrink: 0;
}

.step-text {
    color: #333;
    font-size: 15px;
    line-height: 1.5;
    padding-top: 4px;
}

.action-text {
    font-weight: 600;
    color: #007AFF;
}

.icon-visual {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin: 20px 0;
}

.share-icon-large {
    font-size: 48px;
    margin-bottom: 10px;
}

.icon-label {
    font-size: 14px;
    color: #666;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }

    .app-info {
        flex-direction: column;
        text-align: center;
    }

    .app-icon {
        align-self: center;
    }

    .feature-list {
        grid-template-columns: 1fr;
    }
}

/* Utility & Dynamic Elements */
#userInfo {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 15px;
    border-radius: 8px;
    color: white;
    text-align: center;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}

.debug-panel {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-size: 12px;
    max-width: 300px;
    z-index: 1000;
    display: none;
}

.debug-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.debug-panel-toggle {
    background: #007AFF;
    color: white;
    border: none;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    cursor: pointer;
}

.modal-tip {
    background: #e7f3ff;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.modal-tip-text {
    margin-top: 8px;
    font-size: 14px;
    color: #333;
}

.pwa-debug-info {
    position: fixed;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-family: monospace;
    font-size: 12px;
    z-index: 10000;
    max-width: 300px;
    display: none;
}

