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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* Header Styles */
header {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 2rem 0;
    text-align: center;
}

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

.tagline {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

/* Contact Button */
.contact-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #667eea;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.contact-button:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.contact-button svg {
    width: 16px;
    height: 16px;
}

/* Main Content */
main {
    padding: 3rem 0;
    flex: 1;
}

.apps-section h2 {
    text-align: center;
    color: white;
    font-size: 2rem;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* Apps Grid */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0 3rem 0;
}

/* App Card */
.app-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.app-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.app-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.app-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.app-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.store-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
    align-items: center;
}

.store-button {
    display: block;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.store-button:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.store-button img {
    height: 40px;
    width: auto;
    display: block;
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem 0;
    text-align: center;
    margin-top: auto;
}

.footer-links {
    margin-bottom: 1rem;
}

.footer-links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #5568d3;
    text-decoration: underline;
}

.footer-links .separator {
    margin: 0 1rem;
    color: #999;
}

footer p {
    color: #666;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .contact-button {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
    }

    .apps-section h2 {
        font-size: 1.5rem;
    }

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

    .app-card {
        padding: 1rem;
        gap: 1rem;
    }

    .app-icon {
        width: 50px;
        height: 50px;
    }

    .app-name {
        font-size: 1rem;
    }

    .store-button img {
        height: 35px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    header {
        padding: 1.5rem 0;
    }

    main {
        padding: 2rem 0;
    }

    .app-card {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .app-info {
        flex-direction: column;
        gap: 0.75rem;
    }

    .app-icon {
        width: 60px;
        height: 60px;
    }

    .store-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .store-button img {
        height: 40px;
    }
}

/* Loading State */
.loading {
    text-align: center;
    color: white;
    font-size: 1.2rem;
    padding: 2rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    color: white;
    padding: 3rem 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Content Pages (Terms, Privacy) */
.content-page {
    background: white;
    max-width: 900px;
    margin: 2rem auto;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.content-page h1 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.content-page .last-updated {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.content-page h2 {
    color: #333;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.content-page h3 {
    color: #333;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

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

.content-page ul {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

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

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

.back-link {
    display: inline-block;
    color: #667eea;
    text-decoration: none;
    margin-bottom: 1rem;
    font-weight: 500;
}

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

@media (max-width: 768px) {
    .content-page {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }

    .content-page h1 {
        font-size: 2rem;
    }

    .content-page h2 {
        font-size: 1.25rem;
    }
}

/* Legal Page Additional Styles */
.content-page .intro {
    background: #f8fafc;
    border-left: 4px solid #667eea;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 0 8px 8px 0;
}

.content-page .intro p {
    color: #666;
    font-size: 1.05rem;
    margin-bottom: 0;
}

.content-page .toc {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
}

.content-page .toc h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #667eea;
}

.content-page .toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
    columns: 2;
    column-gap: 2rem;
}

.content-page .toc li {
    margin-bottom: 0.5rem;
}

.content-page .toc a {
    color: #666;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.content-page .toc a:hover {
    color: #667eea;
}

.content-page section {
    margin-bottom: 2.5rem;
}

.content-page .highlight-box {
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.content-page .highlight-box p {
    margin-bottom: 0;
    color: #5568d3;
}

.content-page .highlight-box.green {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.content-page .highlight-box.green p {
    color: #166534;
}

.content-page .contact-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
    text-align: center;
}

.content-page .contact-section h2 {
    margin-top: 0;
    text-align: center;
    color: #667eea;
}

.content-page .third-party-links {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin: 1rem 0;
}

.content-page .third-party-links ul {
    margin: 0.5rem 0 0 1.5rem;
}

@media (max-width: 600px) {
    .content-page .toc ul {
        columns: 1;
    }
}
