/* FateSnap Shared Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #05010A;
    --bg-secondary: #151e2b;
    --accent: #513FF4;
    --accent-hover: #6B5CF6;
    --accent-blue: #4ea1ff;
    --accent-orange: #ff6b4a;
    --text-primary: #FFFFFF;
    --text-secondary: #A0A0A0;
    --text-muted: #6B7280;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.logo-container {
    margin-bottom: 32px;
}

.logo {
    width: 160px;
    height: 160px;
    border-radius: 28px;
    box-shadow: 0 8px 32px rgba(81, 63, 244, 0.3);
}

.app-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin-top: 16px;
    background: linear-gradient(135deg, #513FF4, #4ea1ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* Landing page content */
.landing-content {
    display: none;
}

.landing-content.active {
    display: block;
}

.features {
    margin: 40px 0;
    text-align: left;
}

.feature {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(81, 63, 244, 0.1);
}

.feature:last-child {
    border-bottom: none;
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(81, 63, 244, 0.2), rgba(78, 161, 255, 0.2));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.feature-text h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.feature-text p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Deep link content */
.deeplink-content {
    display: none;
}

.deeplink-content.active {
    display: block;
}

.deeplink-message {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 32px 24px;
    margin: 32px 0;
    border: 1px solid rgba(81, 63, 244, 0.2);
}

.deeplink-message h2 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.deeplink-message p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.path-display {
    background: rgba(81, 63, 244, 0.1);
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 16px;
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--accent);
    word-break: break-all;
}

.loading-indicator {
    display: none;
    margin: 20px 0;
}

.loading-indicator.active {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(81, 63, 244, 0.2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Buttons */
.buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #513FF4, #4ea1ff);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #6B5CF6, #513FF4);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(81, 63, 244, 0.4);
}

.btn-store {
    background: var(--bg-secondary);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-store:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-store img {
    height: 24px;
    width: auto;
}

.store-buttons {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.store-buttons .btn-store {
    flex: 1;
}

/* Footer */
footer {
    padding: 24px;
    text-align: center;
    border-top: 1px solid rgba(81, 63, 244, 0.1);
}

footer a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

footer a:hover {
    color: var(--accent);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.copyright {
    margin-top: 16px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Mobile detection message */
.desktop-notice {
    display: none;
    background: rgba(81, 63, 244, 0.1);
    border: 1px solid rgba(81, 63, 244, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin: 20px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

@media (min-width: 768px) {
    .deeplink-content .desktop-notice {
        display: block;
    }
}

/* SVG Icons inline */
.icon-svg {
    width: 24px;
    height: 24px;
}

/* ===========================
   Content Pages (Legal, Attributions)
   =========================== */

.content-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 24px;
    flex: 1;
}

.content-page .page-header {
    text-align: center;
    margin-bottom: 40px;
}

.content-page .page-header .logo {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(81, 63, 244, 0.3);
}

.content-page .page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 16px;
    background: linear-gradient(135deg, #513FF4, #4ea1ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content-page .page-header .last-updated {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 8px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 24px;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--accent-hover);
}

.content-body {
    text-align: left;
    color: var(--text-secondary);
    line-height: 1.7;
}

.content-body h2 {
    color: var(--text-primary);
    font-size: 1.4rem;
    font-weight: 600;
    margin-top: 36px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(81, 63, 244, 0.15);
}

.content-body h3 {
    color: var(--text-primary);
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 12px;
}

.content-body p {
    margin-bottom: 12px;
}

.content-body ul,
.content-body ol {
    margin-bottom: 12px;
    padding-left: 24px;
}

.content-body li {
    margin-bottom: 6px;
}

.content-body a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

.content-body a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.content-body strong {
    color: var(--text-primary);
}

.content-body blockquote {
    border-left: 3px solid var(--accent);
    padding: 12px 20px;
    margin: 16px 0;
    background: rgba(81, 63, 244, 0.05);
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

/* Voice Model Attributions Table */
.voice-section {
    margin-top: 32px;
}

.voice-section h2 {
    border-bottom: none;
    padding-bottom: 0;
}

.voice-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 32px;
    font-size: 0.9rem;
}

.voice-table th {
    text-align: left;
    padding: 12px 16px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 600;
    border-bottom: 2px solid rgba(81, 63, 244, 0.2);
}

.voice-table td {
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.voice-table tr:hover td {
    background: rgba(81, 63, 244, 0.05);
}

.voice-table a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

.voice-table a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.license-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    background: rgba(81, 63, 244, 0.15);
    color: var(--accent);
}

/* Responsive table */
@media (max-width: 640px) {
    .voice-table {
        font-size: 0.8rem;
    }

    .voice-table th,
    .voice-table td {
        padding: 8px 10px;
    }
}
