/* TikTok Parody - Main Styles */

/* CSS Reset & Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-bg: #000000;
    --secondary-bg: #121212;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-color: #fe2c55;
    --border-color: #2a2a2a;
    --success-color: #25f4ee;
    --transition: 0.3s ease;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    position: relative;
    touch-action: pan-y;
}

/* App Container */
.app-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* Parody Banner */
.parody-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(90deg, #fe2c55 0%, #f57c00 100%);
    color: white;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 1000;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.banner-icon {
    font-size: 18px;
}

.banner-text {
    flex: 1;
    text-align: center;
}

.close-banner {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity var(--transition);
}

.close-banner:hover {
    opacity: 1;
}

.parody-banner.hidden {
    display: none;
}

/* Contact Button (Top Left) */
.contact-btn {
    position: fixed;
    top: 16px;
    left: 16px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 150;
    transition: all var(--transition);
    color: var(--text-primary);
}

.contact-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.contact-btn:active {
    transform: scale(0.95);
}

.contact-btn svg {
    width: 24px;
    height: 24px;
}

/* Bottom Navigation */
.top-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition);
    opacity: 0.6;
}

.nav-btn:hover {
    opacity: 0.8;
}

.nav-btn.active {
    color: var(--text-primary);
    opacity: 1;
}

.nav-btn svg {
    width: 24px;
    height: 24px;
}

/* Views */
.view {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: none;
    overflow: hidden;
}

.view.active {
    display: block;
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 16px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-state p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px;
    text-align: center;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-state h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 24px;
}

/* End of Feed */
.end-of-feed-item {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.end-of-feed-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    max-width: 400px;
}

.end-of-feed-content .end-icon {
    font-size: 64px;
    margin-bottom: 24px;
    opacity: 0.8;
}

.end-of-feed-content h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.end-of-feed-content p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 32px;
}

.end-of-feed-content .primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Buttons */
.primary-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.primary-btn:hover {
    opacity: 0.9;
}

.primary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.secondary-btn {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 12px 32px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.secondary-btn:hover {
    background: var(--secondary-bg);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 2000;
    overflow-y: auto;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--secondary-bg);
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.small-modal {
    max-width: 400px;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition);
    line-height: 1;
}

.close-modal:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(255, 255, 255, 0.95);
    color: #000;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    z-index: 3000;
    pointer-events: none;
    opacity: 0;
    transition: all var(--transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Input Styles */
input[type="text"],
input[type="email"],
input[type="date"],
textarea {
    width: 100%;
    background: var(--primary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: border-color var(--transition);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* Character Counter */
.char-counter {
    display: block;
    text-align: right;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
    margin-bottom: 16px;
}

/* Date of Birth Selector */
.dob-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.dob-dropdown {
    flex: 1;
    background: var(--primary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: border-color var(--transition);
}

.dob-dropdown:focus {
    outline: none;
    border-color: var(--accent-color);
}

.dob-dropdown option {
    background: var(--primary-bg);
    color: var(--text-primary);
}

/* Contact Form Social Link */
.contact-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0 16px;
}

.contact-divider::before,
.contact-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.contact-divider span {
    padding: 0 12px;
    color: var(--text-secondary);
    font-size: 13px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--primary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
}

.social-link:hover {
    background: var(--secondary-bg);
    border-color: var(--text-secondary);
    transform: translateY(-1px);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--primary-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .modal-content {
        max-width: 100%;
        border-radius: 12px 12px 0 0;
        max-height: 95vh;
    }
    
    .parody-banner {
        font-size: 12px;
        padding: 10px 16px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Visible */
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}
