/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f7;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.9;
}

nav {
    text-align: left;
    margin-bottom: 1rem;
}

.back-link {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.back-link:hover {
    opacity: 1;
}

.back-link-hidden {
    visibility: hidden;
}

/* Main Content */
main {
    padding: 3rem 0;
    min-height: calc(100vh - 300px);
    flex: 1;
}

main .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.apps-section {
    margin-top: 2rem;
}

.apps-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #1d1d1f;
}

/* App Cards */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.app-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.app-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 30px rgba(0,0,0,0.15);
}

.app-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.app-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.app-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #1d1d1f;
}

.app-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.app-card .app-info .btn {
    margin-top: auto;
    align-self: flex-start;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-contact {
    background: #34c759;
    color: white;
    font-size: 1.1rem;
}

.btn-contact:hover {
    background: #2fb350;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(52, 199, 89, 0.4);
}

/* App Detail Page */
.app-detail-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: start;
}

.app-screenshot {
    background: transparent;
}

.app-screenshot img {
    width: 100%;
    max-width: 350px;
    border-radius: 12px;
    filter: drop-shadow(0 4px 20px rgba(0,0,0,0.15));
    background: transparent;
}

.app-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #1d1d1f;
}

.app-content h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1d1d1f;
}

.app-long-description {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    white-space: pre-line;
}

.features-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #666;
}

.features-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #34c759;
    font-weight: bold;
}

.app-actions {
    margin-top: 2rem;
    padding: 2rem;
    background: #f5f5f7;
    border-radius: 12px;
}

.help-text {
    margin-top: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

.app-links {
    margin-top: 2rem;
}

.app-footer-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
    padding: 2rem;
    background: #f5f5f7;
    border-radius: 12px;
}

.privacy-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.privacy-link:hover {
    text-decoration: underline;
}

.app-gallery {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.app-gallery img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    object-fit: cover;
}

/* Privacy Policy Page */
.privacy-content {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.last-updated {
    color: #666;
    font-style: italic;
    margin-bottom: 2rem;
}

.privacy-content h2 {
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1d1d1f;
}

.privacy-content p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.privacy-content ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.privacy-content li {
    color: #666;
    margin-bottom: 0.5rem;
}

.privacy-content a {
    color: #667eea;
    text-decoration: none;
}

.privacy-content a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background: #1d1d1f;
    color: white;
    padding: 1rem 0;
    text-align: center;
    margin-top: 3rem;
}

footer p {
    margin: 0.5rem 0;
}

footer a {
    color: #667eea;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        padding: 1rem 0;
    }

    header h1 {
        font-size: 2rem;
    }

    .tagline {
        font-size: 1rem;
    }

    footer {
        padding: 0.75rem 0;
    }

    .app-detail-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .app-screenshot img {
        max-width: 100%;
    }

    .app-gallery {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .apps-grid {
        grid-template-columns: 1fr;
    }

    .app-footer-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .privacy-content {
        padding: 1.5rem;
    }
}
