/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== HOMEPAGE ===== */
.homepage-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.homepage-container {
    max-width: 800px;
    width: 100%;
    text-align: center;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(12px);
    border-radius: 40px;
    padding: 50px 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.brand-section {
    margin-bottom: 40px;
}

.logo {
    font-size: 4rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -1px;
    text-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.tagline {
    font-size: 1.1rem;
    color: #f0e6ff;
    letter-spacing: 2px;
    margin-top: -6px;
    font-weight: 500;
}

.auth-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    margin-top: 30px;
}

.auth-card {
    background: #fff;
    border-radius: 24px;
    padding: 30px 25px;
    width: 200px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    text-align: center;
}

.auth-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.15);
}

.auth-card .card-icon {
    font-size: 2.8rem;
    color: #667eea;
    margin-bottom: 12px;
}

.auth-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
}

.auth-card p {
    color: #777;
    font-size: 0.9rem;
    margin-top: 4px;
}

.home-footer {
    margin-top: 40px;
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
}

/* ===== FORM PAGES ===== */
.form-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.form-container {
    background: #fff;
    border-radius: 32px;
    padding: 40px 35px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.form-container h2 {
    text-align: center;
    margin-bottom: 28px;
    color: #333;
    font-weight: 600;
}

.form-container h2 i {
    color: #667eea;
    margin-right: 8px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
    color: #444;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

.qr-section {
    text-align: center;
    margin: 20px 0;
}

.qr-section p {
    font-weight: 500;
    color: #333;
}

.qr-image {
    max-width: 160px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    margin: 10px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.95rem;
    color: #444;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #667eea;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    text-decoration: none;
    color: #fff;
    background: #667eea;
    width: 100%;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.95rem;
}

.form-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.form-footer a:hover {
    text-decoration: underline;
}

.message {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
}

.message.error {
    background: #fee2e2;
    color: #b91c1c;
}

.message.success {
    background: #dcfce7;
    color: #166534;
}

.message.warning {
    background: #fef9c3;
    color: #854d0e;
}

/* ===== DASHBOARD ===== */
.dashboard-wrapper {
    width: 100%;
    min-height: 100vh;
    background: #f0f2f5;
}

.navbar {
    background: #fff;
    padding: 16px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: #667eea;
    letter-spacing: -0.5px;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-user span {
    font-weight: 500;
    color: #333;
}

.btn-logout {
    background: #ef4444;
    color: #fff;
    padding: 8px 18px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: 0.2s;
}

.btn-logout:hover {
    background: #dc2626;
}

.feed {
    max-width: 600px;
    margin: 30px auto;
    padding: 0 20px;
}

.post-card {
    background: #fff;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    overflow: hidden;
    padding-bottom: 12px;
}

.post-image img {
    width: 100%;
    display: block;
    max-height: 500px;
    object-fit: cover;
}

.post-image .no-image {
    padding: 40px;
    text-align: center;
    color: #999;
    background: #f9fafb;
}

.post-content {
    padding: 16px 18px 8px;
}

.post-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.post-snippet {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

.read-more {
    display: inline-block;
    margin-top: 8px;
    color: #667eea;
    font-weight: 500;
    text-decoration: none;
}

.read-more:hover {
    text-decoration: underline;
}

.post-actions {
    display: flex;
    justify-content: space-between;
    padding: 8px 18px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin-top: 10px;
}

.like-section,
.comment-toggle {
    display: flex;
    align-items: center;
}

.like-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #555;
    transition: 0.2s;
}

.like-btn.liked {
    color: #e0245e;
}

.like-btn i {
    font-size: 1.3rem;
}

.like-btn:hover {
    color: #e0245e;
}

.toggle-comments {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    color: #555;
    transition: 0.2s;
}

.toggle-comments:hover {
    color: #667eea;
}

.comments-section {
    padding: 0 18px 12px;
}

.comments-list {
    margin: 10px 0;
    max-height: 200px;
    overflow-y: auto;
}

.comment-item {
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
}

.comment-item strong {
    color: #333;
    margin-right: 6px;
}

.comment-item .comment-time {
    font-size: 0.75rem;
    color: #999;
    margin-left: 8px;
}

.comment-form {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.comment-form input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 0.95rem;
    outline: none;
}

.comment-form input:focus {
    border-color: #667eea;
}

.btn-comment {
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.2s;
}

.btn-comment:hover {
    background: #5a6fd6;
}

.no-posts {
    text-align: center;
    padding: 50px 20px;
    color: #777;
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 640px) {
    .auth-cards {
        flex-direction: column;
        align-items: center;
    }
    .auth-card {
        width: 100%;
        max-width: 280px;
    }
    .navbar {
        flex-direction: column;
        gap: 10px;
        padding: 12px 16px;
    }
    .nav-user {
        flex-wrap: wrap;
        justify-content: center;
    }
    .form-container {
        padding: 30px 20px;
    }
    .post-card {
        border-radius: 12px;
    }
}