/* ================================
   GLOBAL VARIABLES & RESET
   ================================ */
:root {
    --dark-bg: #050505;
    --card-bg: #111113;
    --accent: linear-gradient(135deg, #6366f1, #a855f7);
    --input-bg: #1a1a1c;
    --text: #ffffff;
    --shadow: 0 30px 60px rgba(0,0,0,0.8);
}

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

body {
    background-color: var(--dark-bg);
    font-family: 'Inter', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: var(--text);
}

/* ================================
   AUTH PAGE STYLES
   ================================ */
.reveal { 
    opacity: 0; 
    transform: translateY(20px); 
    transition: 1s ease; 
}
.reveal.active { 
    opacity: 1; 
    transform: translateY(0); 
}

.login-container {
    display: flex;
    width: 950px;
    height: 580px;
    background: var(--card-bg);
    border-radius: 24px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,0.05);
    overflow: hidden;
}

/* Info Side */
.info-side {
    flex: 1.2;
    background: #000;
    position: relative;
    padding: 60px;
    display: flex;
    align-items: center;
}

.shape {
    position: absolute;
    background: var(--accent);
    filter: blur(40px);
    border-radius: 50%;
    opacity: 0.4;
    animation: float 10s infinite alternate;
}
.s1 { 
    width: 300px; 
    height: 100px; 
    bottom: -20px; 
    left: -50px; 
    transform: rotate(-30deg); 
}
.s2 { 
    width: 150px; 
    height: 150px; 
    top: 10%; 
    right: 5%; 
}

@keyframes float { 
    from { transform: translate(0,0); } 
    to { transform: translate(20px, 40px); } 
}

/* Form Side */
.form-side {
    flex: 1;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--card-bg);
}

.form-header { 
    display: flex; 
    gap: 20px; 
    margin-bottom: 40px; 
}
.form-header button {
    background: none; 
    border: none; 
    color: #555;
    cursor: pointer; 
    font-size: 1rem; 
    font-weight: bold;
    transition: 0.3s; 
    padding-bottom: 5px;
}
.form-header button.active { 
    color: #fff; 
    border-bottom: 2px solid #6366f1; 
}

.input-group input {
    width: 100%; 
    padding: 16px; 
    border-radius: 12px;
    background: var(--input-bg); 
    border: 1px solid #2a2a2c;
    color: #fff; 
    margin-bottom: 15px; 
    transition: 0.3s;
}
.input-group input:focus { 
    border-color: #6366f1; 
    outline: none; 
}

.btn-login {
    width: 100%; 
    padding: 16px; 
    border-radius: 12px;
    border: none; 
    background: var(--accent); 
    color: #fff;
    font-weight: 800; 
    cursor: pointer; 
    transition: 0.3s;
}
.btn-login:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.4); 
}

#response-msg { 
    margin-top: 20px; 
    font-size: 0.9rem; 
    text-align: center; 
}
.error { 
    color: #ff4d4d; 
    animation: shake 0.4s; 
}
.success { 
    color: #4ade80; 
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ================================
   NAVIGATION BAR
   ================================ */
.news-page-body {
    display: block;
    overflow-y: auto;
    background: #050505;
}

.navbar {
    width: 100%;
    padding: 20px 50px;
    background: rgba(17, 17, 19, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}
.logo span { 
    background: var(--accent); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
}

.user-block { 
    display: flex; 
    align-items: center; 
    gap: 20px; 
}
.user-info { 
    text-align: right; 
}
.welcome-text { 
    display: block; 
    font-size: 0.7rem; 
    color: #555; 
    text-transform: uppercase; 
}
#user-display { 
    font-weight: bold; 
    color: #fff; 
}

.nav-btn {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}
.nav-btn:hover { 
    background: rgba(99, 102, 241, 0.3); 
    border-color: rgba(99, 102, 241, 0.5); 
}

#logout-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.9rem;
}
#logout-btn:hover { 
    background: #ff4d4d; 
    border-color: #ff4d4d; 
}

/* ================================
   PAGE HEADER (SHARED)
   ================================ */
.news-wrapper,
.profile-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 50px;
}

.profile-wrapper {
    max-width: 900px;
}

.page-header { 
    margin-bottom: 50px; 
}
.page-header h1 { 
    font-size: 2.5rem; 
    margin-bottom: 10px; 
}
.page-header p { 
    color: #888; 
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    font-size: 1.2rem;
    color: #aaa;
}

.section-title.urgent { 
    color: #6366f1; 
}
.dot { 
    width: 8px; 
    height: 8px; 
    background: currentColor; 
    border-radius: 50%; 
    box-shadow: 0 0 10px currentColor; 
}

/* ================================
   NEWS PAGE STYLES
   ================================ */
.news-grid {
    display: grid;
    gap: 25px;
    transition: all 0.5s ease;
}

.news-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0; 
    left: 0; 
    width: 4px; 
    height: 100%;
    background: var(--accent);
    opacity: 0;
    transition: 0.3s;
}

.news-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.3);
}

.news-card:hover::before { 
    opacity: 1; 
}

.news-card h3 {
    font-size: 1.4rem;
    color: #fff;
    line-height: 1.2;
}

.news-card p {
    color: #aaa;
    line-height: 1.6;
    font-size: 0.95rem;
}

.news-meta {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #555;
}

.tag {
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    font-weight: 600;
}

.loader {
    text-align: center;
    padding: 50px;
    color: #555;
    font-style: italic;
}

/* ================================
   PROFILE PAGE STYLES
   ================================ */
.profile-grid {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.profile-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 35px;
    transition: 0.3s;
}

.profile-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(99, 102, 241, 0.2);
}

/* Avatar & Header */
.card-header {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.avatar-block {
    display: flex;
    align-items: center;
    gap: 20px;
}

.avatar {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.avatar-block h3 {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 4px;
}

.role-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-badge.moderator {
    background: rgba(250, 204, 21, 0.15);
    color: #facc15;
}

/* Info rows */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.info-row + .info-row {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.info-label {
    color: #555;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    color: #fff;
    font-weight: 600;
}

.status-active {
    color: #4ade80;
}

/* Card title & desc */
.card-title {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 8px;
}

.card-desc {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* Phone form */
.phone-form {
    margin-bottom: 20px;
}

.input-row {
    display: flex;
    gap: 12px;
}

.input-row input {
    flex: 1;
    padding: 14px 18px;
    border-radius: 12px;
    background: var(--input-bg);
    border: 1px solid #2a2a2c;
    color: #fff;
    font-size: 1rem;
    transition: 0.3s;
    font-family: 'Inter', monospace;
}

.input-row input:focus {
    border-color: #6366f1;
    outline: none;
}

.btn-save {
    padding: 14px 28px;
    border-radius: 12px;
    border: none;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    white-space: nowrap;
    font-size: 0.95rem;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
}

.btn-save:active {
    transform: translateY(0);
}

.form-msg {
    margin-top: 12px;
    font-size: 0.85rem;
    min-height: 20px;
}

.form-msg.success { 
    color: #4ade80; 
}
.form-msg.error { 
    color: #ff4d4d; 
}

/* Current phone display */
.current-phone {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ================================
   RESPONSIVE STYLES
   ================================ */
@media (max-width: 600px) {
    .profile-wrapper,
    .news-wrapper {
        padding: 0 20px;
    }

    .profile-card {
        padding: 25px;
    }

    .input-row {
        flex-direction: column;
    }

    .avatar-block {
        flex-direction: column;
        text-align: center;
    }
}
