*{
margin:0;
padding:0;
box-sizing:border-box;
font-family:'Vazirmatn',Arial,sans-serif;
}

body{
min-height:100vh;
background:linear-gradient(135deg,#120021,#5b21b6,#a855f7);
background-attachment:fixed;
color:#fff;
overflow-x:hidden;
}

.background{
position:fixed;
top:0;
left:0;
width:400px;
height:400px;
background:#c084fc;
filter:blur(150px);
animation:move 8s infinite alternate;
z-index:0;
pointer-events:none;
}

@keyframes move{
from{transform:translate(0,0);}
to{transform:translate(700px,300px);}
}

.back-home{
position:relative;
z-index:2;
display:inline-block;
margin:25px 25px 0;
padding:10px 22px;
color:#fff;
text-decoration:none;
background:rgba(255,255,255,.12);
border:1px solid rgba(255,255,255,.3);
border-radius:50px;
backdrop-filter:blur(10px);
transition:.3s;
}

.back-home:hover{
box-shadow:0 0 25px #d8b4fe;
}

.comments-page{
position:relative;
z-index:1;
max-width:800px;
margin:0 auto;
padding:40px 20px 80px;
}

h1{
text-align:center;
font-size:50px;
background:linear-gradient(90deg,#fff,#e9d5ff);
-webkit-background-clip:text;
background-clip:text;
color:transparent;
}

.subtitle{
text-align:center;
margin-top:15px;
color:#ddd;
font-size:18px;
}

/* ---------- form ---------- */

.comment-form{
margin-top:45px;
padding:30px;
background:rgba(255,255,255,.12);
border:1px solid rgba(255,255,255,.3);
border-radius:30px;
backdrop-filter:blur(15px);
display:flex;
flex-direction:column;
gap:8px;
}

.comment-form h2{
font-size:24px;
margin-bottom:10px;
}

.comment-form label{
margin-top:10px;
font-weight:bold;
color:#e9d5ff;
}

.comment-form input,
.comment-form textarea{
width:100%;
padding:13px 16px;
color:#fff;
background:rgba(0,0,0,.25);
border:1px solid rgba(255,255,255,.25);
border-radius:14px;
font-size:16px;
outline:none;
transition:.3s;
}

.comment-form textarea{
resize:vertical;
min-height:120px;
}

.comment-form input::placeholder,
.comment-form textarea::placeholder{
color:rgba(255,255,255,.45);
}

.comment-form input:focus,
.comment-form textarea:focus{
border-color:#d946ef;
box-shadow:0 0 15px rgba(217,70,239,.6);
}

.note{
color:#cbb5ee;
font-size:13px;
}

.comment-form button{
margin-top:18px;
padding:14px;
border:none;
border-radius:50px;
cursor:pointer;
color:#fff;
font-size:17px;
font-weight:bold;
background:linear-gradient(135deg,#8b5cf6,#c026d3);
transition:.3s;
}

.comment-form button:hover{
transform:translateY(-3px);
box-shadow:0 0 30px #c084fc;
}

.hp{
position:absolute;
left:-9999px;
width:1px;
height:1px;
overflow:hidden;
}

.alert{
padding:12px 16px;
border-radius:14px;
font-size:15px;
}

.alert.ok{
background:rgba(34,197,94,.2);
border:1px solid rgba(34,197,94,.6);
}

.alert.err{
background:rgba(239,68,68,.2);
border:1px solid rgba(239,68,68,.6);
}

/* ---------- list ---------- */

.list-title{
margin:60px 0 20px;
font-size:26px;
}

.comment-list{
display:flex;
flex-direction:column;
gap:18px;
}

.comment{
padding:20px 24px;
background:rgba(255,255,255,.1);
border:1px solid rgba(255,255,255,.25);
border-radius:22px;
backdrop-filter:blur(12px);
transition:.3s;
}

.comment:hover{
box-shadow:0 0 30px rgba(216,180,254,.55);
}

.c-head{
display:flex;
align-items:center;
gap:14px;
}

.c-avatar{
flex:0 0 46px;
width:46px;
height:46px;
display:flex;
align-items:center;
justify-content:center;
font-size:20px;
font-weight:bold;
border-radius:50%;
background:linear-gradient(135deg,#8b5cf6,#c026d3);
}

.c-who{
flex:1;
min-width:0;
display:flex;
flex-direction:column;
}

.c-who strong{
font-size:18px;
overflow-wrap:anywhere;
}

.c-who small{
color:#d8c3f5;
font-size:13px;
text-align:start;
unicode-bidi:plaintext;
}

.c-head time{
color:#cbb5ee;
font-size:13px;
white-space:nowrap;
}

.c-text{
margin-top:14px;
padding-top:14px;
border-top:1px solid rgba(255,255,255,.18);
line-height:2;
color:#f3e8ff;
overflow-wrap:anywhere;
}

.empty{
text-align:center;
color:#ddd;
padding:30px 0;
}

@media(max-width:700px){
h1{font-size:38px;}
.comment-form{padding:22px;}
.c-head{flex-wrap:wrap;}
.c-head time{width:100%;}
}

/* Responsive layout guard: prevent horizontal overflow on phones */
html, body { width:100%; max-width:100%; overflow-x:clip; }
.comments-page { width:min(100%, 840px); min-width:0; padding-inline:clamp(14px,4vw,24px); }
.comment-form, .comment, .comment-list, .c-head, .c-who { min-width:0; max-width:100%; }
.comment-form input, .comment-form textarea { min-width:0; max-width:100%; }
.c-head time { margin-inline-start:auto; }
@media (max-width:700px) {
  .comments-page { margin-inline:auto; padding:32px 14px 60px; }
  .comment-form { padding:18px 16px; border-radius:20px; }
  .comment { padding:17px 15px; }
  .c-head { flex-wrap:nowrap; align-items:flex-start; }
  .c-head time { width:auto; white-space:normal; text-align:end; font-size:11px; }
  .c-who strong { font-size:16px; }
  .c-text { overflow-wrap:anywhere; word-break:break-word; }
  .background { max-width:100vw; }
}
