/* Mobile-First Compact Design */
:root {
    --primary: #8B5CF6;
    --primary-dark: #7C3AED;
    --text: #1F2937;
    --text-light: #6B7280;
    --bg: #FFFFFF;
    --bg-light: #F9FAFB;
    --border: #E5E7EB;
    --success: #10B981;
    --error: #EF4444;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-light);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
}

.app-container {
    max-width: 400px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    display: flex;
    flex-direction: column;
}

/* Compact Header */
.app-header {
    background: var(--primary);
    color: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-main {
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-icon {
    font-size: 20px;
}

.app-header h1 {
    font-size: 16px;
    font-weight: 600;
}

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

.connection-status {
    font-size: 11px;
    background: rgba(255,255,255,0.2);
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 500;
}

.share-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

/* Status Bar */
.status-bar {
    display: none;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

.status-bar.success { background: #D1FAE5; color: #065F46; }
.status-bar.error { background: #FEE2E2; color: #991B1B; }

/* Auth Section */
.auth-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
}

.auth-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 300px;
}

.auth-header h2 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text);
}

.auth-header p {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 13px;
}

.signin-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
}

.signin-btn:hover {
    background: var(--primary-dark);
}

.manual-btn {
    background: transparent;
    color: var(--text-light);
    border: 1px solid var(--border);
    padding: 10px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    width: 100%;
    font-size: 13px;
}

/* Main App */
.main-app {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Cards */
.compose-card, .posts-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
}

.compose-card h3, .posts-card h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--text);
}

/* Form */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 13px;
    color: var(--text);
}

textarea, input[type="datetime-local"] {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    font-size: 14px;
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
}

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

textarea:focus, input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.char-count {
    text-align: right;
    margin-top: 4px;
}

.char-count span {
    font-size: 11px;
    color: var(--text-light);
}

/* Quick Times */
.quick-times {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.quick-times button {
    flex: 1;
    background: var(--bg-light);
    border: 1px solid var(--border);
    padding: 8px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    color: var(--text);
}

.quick-times button:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 8px;
}

.primary-btn, .secondary-btn {
    flex: 1;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    border: none;
}

.primary-btn {
    background: var(--primary);
    color: white;
}

.primary-btn:hover {
    background: var(--primary-dark);
}

.secondary-btn {
    background: var(--bg-light);
    color: var(--text);
    border: 1px solid var(--border);
}

/* Posts List */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.post-item {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    position: relative;
}

.post-content {
    font-size: 13px;
    margin-bottom: 6px;
    color: var(--text);
    line-height: 1.4;
}

.post-time {
    font-size: 11px;
    color: var(--text-light);
}

.delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    color: var(--error);
    padding: 4px;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 360px) {
    .app-header {
        padding: 10px 12px;
    }
    
    .main-app {
        padding: 12px;
    }
    
    .compose-card, .posts-card {
        padding: 12px;
    }
}
