/* ===== APP DETAIL CSS ===== */

/* CSS Variables */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --text: #1f2937;
    --text-light: #6b7280;
    --bg-1: #ffffff;
    --bg-2: #f9fafb;
    --bg-3: #f3f4f6;
    --border: #e5e7eb;
    --border-light: #f3f4f6;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg-2);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--bg-1);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 1.1rem;
}

.logo i {
    font-size: 1.2rem;
}

.store-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
}

.store-link:hover {
    color: var(--primary);
}

.store-link i {
    font-size: 1.1rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.create-app-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--primary);
    color: var(--bg-1);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}

.create-app-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* Main Content */
.main-content {
    padding: 40px 0;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 100px 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-state p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* App Content */
.app-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* App Header */
.app-header {
    background: var(--bg-1);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow);
}

.app-header-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.app-icon-section {
    flex-shrink: 0;
}

.app-icon {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--bg-1);
    box-shadow: var(--shadow-lg);
}

.app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
}

.app-info {
    flex: 1;
}

.app-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.2;
}

.app-developer {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.app-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.app-category, .app-date, .app-version {
    background: var(--bg-3);
    color: var(--text);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.app-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: var(--bg-1);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-3);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--bg-1);
    transform: translateY(-2px);
}

/* App Gallery */
.app-gallery {
    background: var(--bg-1);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.gallery-header {
    margin-bottom: 24px;
}

.gallery-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.gallery-item {
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

/* App Description */
.app-description {
    background: var(--bg-1);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.description-header {
    margin-bottom: 24px;
}

.description-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
}

.description-content {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text);
}

.description-content p {
    margin-bottom: 16px;
}

/* App Features */
.app-features {
    background: var(--bg-1);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.features-header {
    margin-bottom: 24px;
}

.features-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-2);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.feature-item i {
    font-size: 1.2rem;
    color: var(--primary);
    width: 24px;
    text-align: center;
}

.feature-item span {
    font-weight: 500;
    color: var(--text);
}

/* App Details */
.app-details {
    background: var(--bg-1);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.details-header {
    margin-bottom: 24px;
}

.details-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-2);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.detail-label {
    font-weight: 500;
    color: var(--text-light);
}

.detail-value {
    font-weight: 600;
    color: var(--text);
}

/* App Links */
.app-links {
    background: var(--bg-1);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.links-header {
    margin-bottom: 24px;
}

.links-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.link-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
}

.link-item:hover {
    background: var(--primary);
    color: var(--bg-1);
    transform: translateY(-2px);
}

.link-item i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.link-item span {
    font-weight: 500;
}

/* Legal Pages */
.legal-pages {
    background: var(--bg-1);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.legal-header {
    margin-bottom: 24px;
}

.legal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
}

.legal-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.legal-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: var(--transition);
}

.legal-link:hover {
    background: var(--primary);
    color: var(--bg-1);
    transform: translateY(-2px);
}

.legal-link i {
    font-size: 1rem;
}

/* Error State */
.error-state {
    text-align: center;
    padding: 100px 20px;
}

.error-state i {
    font-size: 4rem;
    color: var(--warning);
    margin-bottom: 20px;
}

.error-state h3 {
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 12px;
}

.error-state p {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 30px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-1);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9);
    transition: var(--transition);
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg-3);
    color: var(--text);
}

.modal-body {
    padding: 30px;
}

.share-options {
    display: grid;
    gap: 12px;
}

.share-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
}

.share-option:hover {
    background: var(--primary);
    color: var(--bg-1);
    transform: translateY(-2px);
}

.share-option i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

/* Footer */
.footer {
    background: var(--text);
    color: var(--bg-1);
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--bg-1);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Notification Container */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

.notification.success {
    border-left: 4px solid var(--success);
}

.notification.error {
    border-left: 4px solid var(--danger);
}

.notification.warning {
    border-left: 4px solid var(--warning);
}

.notification.info {
    border-left: 4px solid var(--info);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        height: auto;
        padding: 20px;
        gap: 20px;
    }
    
    .header-left {
        flex-direction: column;
        gap: 10px;
    }
    
    .app-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .app-icon {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
        margin: 0 auto;
    }
    
    .app-title {
        font-size: 2rem;
    }
    
    .app-meta {
        justify-content: center;
    }
    
    .app-actions {
        justify-content: center;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
    }
    
    .links-grid {
        grid-template-columns: 1fr;
    }
    
    .legal-links {
        flex-direction: column;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .app-header {
        padding: 20px;
    }
    
    .app-title {
        font-size: 1.8rem;
    }
    
    .app-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .notification {
        min-width: 280px;
        margin: 0 10px;
    }
}

