*{margin:0;padding:0;box-sizing:border-box}html,body{width:100%;height:100%}.navbar{width:100%;background:linear-gradient(90deg,#0f1724,#1a2640);color:#fff;box-shadow:0 3px 12px #0006;position:sticky;top:0;z-index:50}.nav-container{max-width:100%;margin:0 auto;padding:14px 24px;display:flex;align-items:center;justify-content:space-between}.nav-logo{text-decoration:none;color:#fff;font-weight:800;font-size:1.5rem;letter-spacing:.5px;transition:transform .2s}.nav-logo:hover{transform:scale(1.05)}.nav-logo .accent{color:#ffd166}.nav-links ul{list-style:none;display:flex;gap:22px;margin:0;padding:0;align-items:center}.nav-links a{text-decoration:none;color:#dce6f3;padding:8px 14px;border-radius:8px;font-weight:600;transition:background .25s,color .25s,transform .2s}.nav-links a:hover{background:#ffffff1a;color:#fff;transform:translateY(-2px)}.btn-login{background:#ffd166;color:#0f1724;padding:8px 16px;border-radius:8px;font-weight:700;transition:background .25s,transform .2s}.btn-login:hover{background:#ffca3a;transform:scale(1.05)}.btn-logout{background:#ef233c;color:#fff;padding:8px 16px;border-radius:8px;font-weight:700;border:none;cursor:pointer;transition:background .25s,transform .2s}.btn-logout:hover{background:#d90429;transform:scale(1.05)}.nav-toggle{display:none;background:transparent;border:none;cursor:pointer;padding:8px}.nav-toggle .bar{display:block;width:24px;height:2.5px;background:#fff;transition:transform .3s,opacity .3s}.nav-avatar{width:36px;height:36px;border-radius:50%;-o-object-fit:cover;object-fit:cover;border:2px solid #ffd166}@media (max-width: 768px){.nav-toggle{display:inline-flex;align-items:center;justify-content:center}.nav-links{position:absolute;top:65px;right:18px;background:#1a2640;border-radius:12px;padding:16px;box-shadow:0 6px 20px #00000073;transform:scaleY(0);transform-origin:top right;transition:transform .3s ease-in-out;min-width:200px}.nav-links.show{transform:scaleY(1)}.nav-links ul{flex-direction:column;align-items:stretch;gap:12px}.nav-links a{display:block;padding:12px 16px}.nav-toggle.open .bar:nth-child(1){transform:translateY(7px) rotate(45deg)}.nav-toggle.open .bar:nth-child(2){opacity:0}.nav-toggle.open .bar:nth-child(3){transform:translateY(-7px) rotate(-45deg)}}.post-card{background:#fff;border:1px solid #e5e7eb;border-radius:16px;padding:16px;text-decoration:none;display:flex;flex-direction:column;transition:box-shadow .3s ease,transform .2s ease;box-shadow:0 2px 6px #0000000d}.post-card:hover{box-shadow:0 6px 18px #0000001a;transform:translateY(-3px)}.post-image-wrapper{width:100%;height:200px;overflow:hidden;border-radius:12px;margin-bottom:12px;border:1px solid #ddd}.post-image{width:100%;height:100%;-o-object-fit:contain;object-fit:contain;-o-object-position:center;object-position:center;background:#f3f4f6;transition:transform .3s ease}.post-image:hover{transform:scale(1.05)}.post-title{font-size:1.25rem;font-weight:600;color:#1f2937;margin-bottom:8px}.post-desc{font-size:.95rem;color:#4b5563;flex:1;line-height:1.5}.post-footer{display:flex;align-items:center;justify-content:space-between;margin-top:12px;padding-top:10px;border-top:1px solid #e5e7eb}.post-author{display:flex;align-items:center;gap:8px}.post-avatar{width:32px;height:32px;border-radius:50%;-o-object-fit:cover;object-fit:cover;border:1px solid #ccc}.post-author-name{font-size:.9rem;font-weight:500;color:#374151}.post-date{font-size:.75rem;color:#9ca3af}.no-posts{display:flex;flex-direction:column;align-items:center;justify-content:center;height:60vh;color:#6b7280;text-align:center}.no-posts-icon{font-size:3rem;margin-bottom:16px;opacity:.8}.no-posts-title{font-size:1.5rem;font-weight:600;color:#374151;margin-bottom:8px}.no-posts-text{font-size:1rem;color:#6b7280}.addpost-btn{position:fixed;bottom:24px;right:24px;width:56px;height:56px;border-radius:50%;background:#2563eb;color:#fff;font-size:28px;font-weight:700;display:flex;align-items:center;justify-content:center;border:none;cursor:pointer;box-shadow:0 4px 10px #00000040;transition:all .3s ease-in-out}.addpost-btn:hover{background:#1d4ed8;transform:scale(1.1);box-shadow:0 6px 14px #0000004d}.loader-wrapper{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px 0;color:#4b5563}.spinner{position:relative;width:64px;height:24px;display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.dot{width:14px;height:14px;background:#2563eb;border-radius:50%;animation:bounce .9s infinite ease-in-out;box-shadow:0 2px 8px #2563eb59}.dot2{animation-delay:.15s}.dot3{animation-delay:.3s}@keyframes bounce{0%,80%,to{transform:translateY(0);opacity:.7}40%{transform:translateY(-10px);opacity:1}}.loader-text{font-size:.95rem;font-weight:600}.auth-page{min-height:calc(100vh - 80px);display:flex;align-items:center;justify-content:center;padding:40px 16px;background:#f6f8fb}.auth-card{width:360px;background:#fff;border-radius:10px;padding:26px;box-shadow:0 8px 30px #1d21290f;display:flex;flex-direction:column;gap:12px}.auth-card h2{margin:0;text-align:center;font-size:1.6rem}.auth-card input{padding:12px 14px;border-radius:8px;border:1px solid #e3e7ee;outline:none;font-size:.95rem}.auth-card input:focus{box-shadow:0 0 0 4px #6366f114;border-color:#6366f199}.auth-btn{margin-top:8px;padding:10px 14px;border-radius:8px;border:none;background:#6366f1;color:#fff;font-weight:600;cursor:pointer}.auth-btn:hover{filter:brightness(.95)}.small{text-align:center;color:#6b7280;font-size:.9rem;margin-top:6px}.addpost-container{display:flex;justify-content:center;margin-top:2.5rem;padding:1rem;background:#f5f7fa;min-height:100vh}.addpost-form{background:linear-gradient(135deg,#fff,#f9f9f9);border-radius:20px;padding:28px;width:100%;max-width:500px;box-shadow:0 8px 24px #00000014;transition:transform .2s ease-in-out}.addpost-form:hover{transform:translateY(-3px)}.addpost-title{font-size:22px;font-weight:700;color:#1a1a1a;margin-bottom:20px;text-align:center;letter-spacing:-.5px}.addpost-input,.addpost-textarea{width:100%;border:none;border-radius:12px;padding:14px 16px;margin-bottom:14px;font-size:15px;color:#333;background:#f0f2f5;transition:all .2s ease-in-out}.addpost-input:focus,.addpost-textarea:focus{background:#fff;border:1px solid #007bff;outline:none;box-shadow:0 0 0 3px #007bff33}.addpost-textarea{resize:none;min-height:120px}.addpost-upload{display:block;margin-bottom:18px;cursor:pointer;font-size:14px;color:#444;font-weight:500}.addpost-upload input{display:none}.upload-box{margin-top:8px;padding:12px;border:2px dashed #bbb;border-radius:12px;background:#fafafa;color:#777;font-size:14px;text-align:center;transition:all .2s ease-in-out}.addpost-preview{margin-bottom:18px}.addpost-preview p{font-size:13px;color:#666;margin-bottom:6px}.addpost-preview img{width:100%;height:240px;-o-object-fit:cover;object-fit:cover;border-radius:14px;border:1px solid #ddd;transition:transform .3s ease}.addpost-preview img:hover{transform:scale(1.02)}.addpost-button{width:100%;padding:14px;background:linear-gradient(135deg,#007bff,#0056d2);color:#fff;font-weight:700;border:none;border-radius:12px;cursor:pointer;font-size:15px;transition:all .3s ease;box-shadow:0 4px 14px #007bff66}.addpost-button:hover{background:linear-gradient(135deg,#0056d2,#003c9e);box-shadow:0 6px 18px #0056d280;transform:translateY(-2px)}.upload-box{display:flex;justify-content:center;align-items:center;border:2px dashed #bbb;border-radius:12px;padding:20px;background:#fafafa;color:#555;font-size:15px;font-weight:500;margin-bottom:18px;cursor:pointer;transition:all .3s ease-in-out}.upload-box:hover{background:#eef6ff;border-color:#007bff;color:#007bff}.upload-box input{display:none}.addpost-preview{margin-bottom:18px;background:#fff;padding:14px;border-radius:14px;border:1px solid #eee;box-shadow:0 4px 12px #0000000d;text-align:center}.addpost-preview p{font-size:14px;font-weight:500;margin-bottom:10px;color:#444}.addpost-preview img{width:100%;height:220px;-o-object-fit:cover;object-fit:cover;border-radius:12px;transition:transform .3s ease}.addpost-preview img:hover{transform:scale(1.03)}.about-container{max-width:900px;margin:40px auto;padding:25px;background:#fff;border-radius:16px;box-shadow:0 6px 16px #0000001a;font-family:Segoe UI,sans-serif;line-height:1.6}.about-container h1{text-align:center;margin-bottom:25px;color:#222}.intro{font-size:17px;color:#444;margin-bottom:30px;text-align:center}.about-section{margin-bottom:30px}.about-section h2{color:#333;margin-bottom:15px}.about-section ul{list-style:none;padding-left:0}.about-section ul li{background:#f9f9f9;margin-bottom:10px;padding:12px;border-radius:8px;font-size:15px}.profile-card{display:flex;align-items:center;gap:15px;background:#fdfdfd;padding:15px;border-radius:12px;box-shadow:0 2px 8px #00000014}.profile-img{width:100px;height:100px;border-radius:50%;-o-object-fit:cover;object-fit:cover}.profile-card h3{margin:0;color:#111}.profile-card p{margin:5px 0;color:#555}.links a{margin-right:15px;text-decoration:none;font-size:14px;color:#0077b5;font-weight:700}.links a:hover{text-decoration:underline}.profile-container{max-width:900px;margin:auto;padding:20px;font-family:Arial,sans-serif}.profile-card{background:#fff;border-radius:15px;box-shadow:0 4px 12px #0000001a;overflow:hidden;margin-bottom:30px;text-align:center}.profile-cover{height:120px;background:linear-gradient(135deg,#667eea,#764ba2)}.profile-avatar img{width:120px;height:120px;border-radius:50%;margin-top:-60px;border:4px solid #fff;-o-object-fit:cover;object-fit:cover}.profile-info h2{margin:10px 0 5px}.profile-info .email{color:#555;font-size:14px}.profile-info .bio{margin:10px auto;font-style:italic;color:#666}.details{margin:15px 0;font-size:14px}.actions .btn{margin:5px;padding:8px 14px;border-radius:8px;cursor:pointer;border:none;font-weight:700}.btn.edit{background:#667eea;color:#fff}.btn.logout{background:#e53e3e;color:#fff}.posts-section{margin-top:40px}.post-card{background:#fff;border-radius:12px;padding:15px;margin-bottom:15px;box-shadow:0 2px 6px #0000001a}.post-card h3{margin:0 0 10px;color:#333}.post-actions{margin-top:10px}.post-actions .btn{padding:6px 12px;border-radius:6px}.modal-overlay{position:fixed;inset:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:1000}.modal{width:100%;max-width:560px;background:#fff;border-radius:16px;box-shadow:0 12px 30px #00000026;padding:24px}.modal-title{margin:0 0 12px;font-size:20px}.edit-form{display:flex;flex-direction:column;gap:12px}.avatar-preview{display:flex;justify-content:center;margin-bottom:8px}.avatar-preview img{width:96px;height:96px;border-radius:50%;-o-object-fit:cover;object-fit:cover;border:3px solid #e5e7eb}.input-field,.textarea-field{width:100%;padding:12px 14px;border:1px solid #d1d5db;border-radius:10px;font-size:14px;color:#111827;outline:none;transition:border-color .2s ease,box-shadow .2s ease}.input-field:focus,.textarea-field:focus{border-color:#667eea;box-shadow:0 0 0 3px #667eea40}.textarea-field{min-height:110px;resize:vertical}.image-upload-label{display:block;background:#f9fafb;padding:12px;border:1px dashed #9ca3af;border-radius:10px;cursor:pointer;color:#374151}.hidden-file-input{display:none}.label-text{font-weight:600}.uploading{color:#6b7280;font-size:14px}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:8px}.post-details-container{max-width:900px;margin:3rem auto;padding:0 20px;animation:fadeIn .5s ease-out}@keyframes fadeIn{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.loader-page,.error-page{text-align:center;padding:60px;font-size:1.5rem;font-weight:600;color:#4b5563;background:#f3f4f6;margin:3rem auto;max-width:600px;border-radius:16px;box-shadow:0 4px 12px #0000000d}.general-error-message{background:#fecaca;color:#dc2626;padding:15px;border-radius:8px;margin-bottom:20px;font-weight:500;border:1px solid #fca5a5}.post-details-card{background:#fff;border-radius:20px;box-shadow:0 10px 30px #00000014,0 0 0 1px #00000005;padding:30px;display:flex;flex-direction:column;gap:25px}.read-view{transition:opacity .3s ease-in-out}.post-image{max-height:450px;overflow:hidden;border-radius:16px;margin-bottom:20px;box-shadow:0 4px 10px #0000001a}.post-image img{width:100%;height:100%;-o-object-fit:cover;object-fit:cover;display:block;transition:transform .3s ease-in-out}.post-image img:hover{transform:scale(1.02)}.post-title{font-size:2.5rem;font-weight:700;color:#1f2937;margin-bottom:15px;line-height:1.2}.post-description{font-size:1.1rem;line-height:1.8;color:#4b5563;white-space:pre-line}.author-info{display:flex;align-items:center;gap:15px;padding:15px 0;border-top:1px solid #e5e7eb;font-size:1rem;color:#6b7280}.author-avatar{width:50px;height:50px;border-radius:50%;-o-object-fit:cover;object-fit:cover;border:3px solid #d1d5db;transition:transform .2s ease}.author-info:hover .author-avatar{transform:scale(1.05)}.author-name{font-weight:600;color:#374151}.actions,.form-actions{display:flex;gap:15px;margin-top:10px}.btn{padding:12px 24px;border:none;border-radius:10px;cursor:pointer;font-weight:600;font-size:1rem;transition:all .3s ease;box-shadow:0 4px 6px #0000001a}.btn:disabled{opacity:.6;cursor:not-allowed;box-shadow:none}.btn-edit{background:#3b82f6;color:#fff}.btn-delete{background:#ef4444;color:#fff}.btn-save{background:#10b981;color:#fff}.btn-cancel{background:#6b7280;color:#fff}.btn-edit:hover,.btn-delete:hover,.btn-save:hover,.btn-cancel:hover{opacity:.9;transform:translateY(-2px);box-shadow:0 6px 12px #00000026}.edit-view{display:flex;flex-direction:column;gap:20px;transition:all .5s ease-in-out}.post-image-preview{max-height:400px;overflow:hidden;border-radius:16px;border:3px dashed #d1d5db;display:flex;justify-content:center;align-items:center;background:#f9fafb;position:relative}.post-image-preview img{width:100%;height:100%;-o-object-fit:cover;object-fit:cover;display:block;border-radius:12px}.post-image-preview.no-image{min-height:150px;font-size:1.2rem;color:#9ca3af;background:#f3f4f6;border:3px dashed #e5e7eb}.edit-form{display:flex;flex-direction:column;gap:15px;padding:10px 0}.input-title,.textarea-desc{width:100%;padding:14px 18px;border:1px solid #d1d5db;border-radius:10px;font-size:1rem;color:#374151;transition:border-color .3s ease,box-shadow .3s ease}.input-title:focus,.textarea-desc:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f633}.textarea-desc{resize:vertical;min-height:150px}.image-upload-label{display:block;background:#f9fafb;padding:15px;border:1px dashed #9ca3af;border-radius:10px;cursor:pointer;font-size:1rem;color:#4b5563;transition:background-color .3s ease,border-color .3s ease}.image-upload-label:hover{background:#f3f4f6;border-color:#3b82f6}.image-upload-label input[type=file]{display:none}.label-text{font-weight:600;margin-right:10px}.file-name{font-style:italic;color:#3b82f6;margin-left:10px}.myposts-container{max-width:1000px;margin:30px auto;padding:20px}.title{font-size:28px;font-weight:700;margin-bottom:25px;text-align:center;color:#222}.loading,.empty{text-align:center;font-size:18px;color:#555;margin-top:40px}.posts-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:20px}.post-card{background:#fff;border-radius:12px;overflow:hidden;box-shadow:0 4px 12px #0000001a;transition:transform .2s ease,box-shadow .2s ease;display:flex;flex-direction:column}.post-card:hover{transform:translateY(-5px);box-shadow:0 8px 20px #00000026}.post-image{width:100%;height:180px;-o-object-fit:cover;object-fit:cover}.post-content{padding:15px}.post-content h3{font-size:20px;margin-bottom:10px;color:#333}.post-content p{font-size:15px;color:#555;margin-bottom:12px;line-height:1.4}.post-content small{font-size:13px;color:#777}.confirm-modal-overlay{position:fixed;inset:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:1000}.confirm-modal{width:min(480px,90vw);background:#fff;border-radius:12px;box-shadow:0 10px 30px #0003;overflow:hidden;animation:cm-pop .15s ease-out}@keyframes cm-pop{0%{transform:translateY(6px);opacity:0}to{transform:translateY(0);opacity:1}}.confirm-modal-header{padding:14px 16px;border-bottom:1px solid #eee}.confirm-modal-title{margin:0;font-size:18px}.confirm-modal-body{padding:16px}.confirm-modal-message{margin:0;color:#333;line-height:1.5}.confirm-modal-actions{display:flex;gap:10px;justify-content:flex-end;padding:12px 16px 16px}.cm-btn{padding:8px 14px;border-radius:8px;border:none;cursor:pointer;font-weight:600}.cm-cancel{background:#f1f5f9;color:#0f172a}.cm-confirm{background:#ef4444;color:#fff}.cm-btn:disabled{opacity:.6;cursor:not-allowed}
