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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 800px;
}

/* ============================================================================
   Landing Page
   ============================================================================ */

.landing-page {
    width: 100%;
}

.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.card-header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.card-header .subtitle {
    font-size: 1.1em;
    opacity: 0.95;
}

.card-body {
    padding: 40px 30px;
}

.description {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 30px;
    text-align: center;
    line-height: 1.6;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
    text-align: center;
}

.emoji {
    font-size: 2em;
}

.feature span:last-child {
    color: #666;
    font-weight: 500;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1em;
}

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

.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-large {
    padding: 16px 48px;
    font-size: 1.1em;
    width: 100%;
    text-align: center;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9em;
}

.card-footer {
    background: #f9f9f9;
    padding: 20px 30px;
    border-top: 1px solid #eee;
}

.small-text {
    font-size: 0.85em;
    color: #888;
    text-align: center;
    line-height: 1.5;
}

/* ============================================================================
   Feed Page
   ============================================================================ */

.feed-page {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.feed-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.feed-header h1 {
    font-size: 2em;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    font-size: 0.95em;
    opacity: 0.95;
}

.feed-list {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-item {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    background: #fafafa;
    transition: all 0.3s ease;
}

.post-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.author-info {
    flex: 1;
}

.author-name {
    font-weight: 700;
    color: #222;
}

.author-handle {
    color: #888;
    font-size: 0.9em;
}

.post-link {
    color: #667eea;
    text-decoration: none;
    font-size: 1.2em;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

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

.post-text {
    color: #333;
    line-height: 1.5;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.post-metrics {
    display: flex;
    gap: 15px;
    font-size: 0.85em;
    color: #888;
    margin-bottom: 15px;
}

.action-section {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.quote-comment {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9em;
    resize: vertical;
    min-height: 60px;
    margin-bottom: 10px;
    transition: border-color 0.3s ease;
}

.quote-comment:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-btn {
    flex: 1;
    padding: 12px 20px;
    font-size: 0.9em;
    white-space: nowrap;
}

.action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.action-status {
    font-size: 0.85em;
    color: #888;
    min-width: 100px;
}

.action-status.loading {
    color: #667eea;
    animation: pulse 1.5s infinite;
}

.action-status.success {
    color: #22c55e;
}

.action-status.error {
    color: #ef4444;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Fade out animation for removed posts */
@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(-10px);
    }
}

.post-item.removing {
    animation: fadeOut 0.5s ease forwards;
}

/* ============================================================================
   Toast Notification
   ============================================================================ */

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    background: #333;
    color: white;
    font-size: 0.95em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.toast.success {
    background: #22c55e;
}

.toast.error {
    background: #ef4444;
}

/* ============================================================================
   Empty State
   ============================================================================ */

.empty-state {
    padding: 60px 30px;
    text-align: center;
    color: #888;
}

.empty-state p {
    font-size: 1.1em;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* ============================================================================
   Responsive
   ============================================================================ */

@media (max-width: 600px) {
    .card-header h1 {
        font-size: 1.8em;
    }
    
    .feed-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .post-header {
        flex-direction: column;
    }
    
    .post-link {
        align-self: flex-start;
        margin-top: 10px;
    }
    
    .quote-comment {
        min-height: 80px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-status {
        width: 100%;
        text-align: center;
    }
    
    .btn-large {
        padding: 14px 20px;
        font-size: 1em;
    }
    
    .toast {
        left: 10px;
        right: 10px;
    }
}
