/* ============================================
   MASTER CSS - MERGED FORUM STYLES
   ============================================ */

/* ---------- RESET & BASE ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #0a0a2e 0%, #0D42DF 50%, #1a3a7a 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    padding: 0 15px;
    position: relative;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(2px 2px at 20% 30%, rgba(255,215,0,0.15), transparent),
        radial-gradient(2px 2px at 40% 70%, rgba(255,215,0,0.10), transparent),
        radial-gradient(2px 2px at 60% 20%, rgba(255,215,0,0.15), transparent);
    background-size: 200px 200px;
    animation: twinkle 4s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes twinkle {
    0% { opacity: 0.3; }
    100% { opacity: 0.7; }
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

/* ---------- CONTAINERS ---------- */
.profile-container,
.rules-container,
.market-container {
    max-width: 700px;
    margin: 20px auto;
    padding: 15px 0;
    position: relative;
    z-index: 1;
}

.rules-container {
    max-width: 800px;
}

.market-container {
    max-width: 600px;
}

/* ---------- HEADER ---------- */
.forum-header {
    background: linear-gradient(135deg, #691a7a, #edb2c3);
    border-radius: 12px;
    padding: 25px 20px;
    margin-bottom: 20px;
    border: 2px solid rgba(255, 215, 0, 0.2);
    text-align: center;
}

.forum-header h1 {
    color: #ffd700;
    font-size: 1.8rem;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(255,215,0,0.2);
    margin: 0 0 5px 0;
}

.forum-header .subtitle {
    color: rgba(255,255,255,0.6);
    font-size: 0.95rem;
}

/* ---------- NAVIGATION BAR ---------- */
.nav-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    padding: 8px 15px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.06);
    gap: 10px;
}

.nav-bar .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
}

.nav-bar .nav-links a {
    color: rgba(255,255,255,0.7);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 5px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-bar .nav-links a:hover {
    background: rgba(255,215,0,0.12);
    color: #ffd700;
}

.nav-bar .nav-links a.active {
    background: rgba(255,215,0,0.12);
    color: #ffd700;
}

.nav-bar .user-info {
    color: rgba(255,255,255,0.8);
    font-size: 0.85rem;
    font-weight: 600;
}

.nav-bar .user-info .username {
    color: #ffd700;
}

.nav-bar .user-info a {
    color: #ffd700;
    margin-left: 6px;
}

.nav-bar .user-info a:hover {
    color: #fff;
}

/* ---------- PROFILE/RULES CARDS ---------- */
.profile-card,
.rules-card,
.market-card {
    background: rgba(255, 207, 64, 0.69);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px 25px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.rules-card,
.market-card {
    background: rgba(64, 148, 255, 0.69);
}

/* ---------- PROFILE HEADER ---------- */
.profile-header,
.rules-header,
.card-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255,215,0,0.1);
}

.profile-avatar {
    position: relative;
    display: inline-block;
}

.profile-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255,215,0,0.3);
    background: #0a0a2e;
    transition: all 0.3s ease;
}

.profile-avatar img:hover {
    border-color: #ffd700;
    transform: scale(1.02);
}

.profile-avatar .status-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    border: 2px solid #0a0a2e;
}

.profile-avatar .status-badge.active {
    background: #4ade80;
    color: #0a0a2e;
}

.profile-avatar .status-badge.banned {
    background: #ff6b6b;
    color: #fff;
}

.profile-name {
    color: #000;
    font-size: 1.8rem;
    font-weight: 800;
    margin: 10px 0 5px 0;
}

.profile-username {
    color: rgba(255,255,255,0.4);
    font-size: 0.9rem;
}

.profile-tagline {
    display: inline-block;
    background: rgba(255,215,0,0.08);
    color: rgba(255,215,0,0.6);
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-style: italic;
    margin-top: 6px;
    border: 1px solid rgba(255,215,0,0.06);
}

.profile-role {
    display: inline-block;
    background: linear-gradient(135deg, #ffd700, #f9a825);
    color: #0a0a2e;
    padding: 4px 18px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.75rem;
    margin-top: 5px;
}

/* ---------- RULES BADGE ---------- */
.rules-header .badge {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: #fff;
    padding: 6px 20px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    animation: pulse 2s infinite;
}

.card-header .badge {
    display: inline-block;
    background: linear-gradient(135deg, #ffd700, #f9a825);
    color: #0a0a2e;
    padding: 6px 20px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.rules-header h1,
.card-header h1 {
    color: #ffd700;
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
}

.card-header h1 {
    color: #fff;
    font-size: 1.6rem;
}

.rules-header h1 .gold,
.card-header h1 .gold {
    color: #ffd700;
}

.rules-header p,
.card-header p {
    color: rgba(255,255,255,0.5);
    font-size: 0.95rem;
    margin: 5px 0 0 0;
}

/* ---------- PROFILE STATS ---------- */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.04);
}

.profile-stats .stat-item {
    text-align: center;
}

.profile-stats .stat-item .stat-number {
    color: #001cff;
    font-size: 1.5rem;
    font-weight: 800;
    display: block;
}

.profile-stats .stat-item .stat-label {
    color: rgba(255, 255, 255, 0.73);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---------- PROFILE DETAILS ---------- */
.profile-details {
    margin: 20px 0;
}

.detail-row {
    display: flex;
    flex-wrap: wrap;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: rgba(255,255,255,0.4);
    font-weight: 600;
    font-size: 0.85rem;
    min-width: 140px;
}

.detail-value {
    color: #000;
    font-weight: 500;
    font-size: 0.9rem;
    word-break: break-word;
}

.detail-value .update-link {
    color: #ffd700;
    font-weight: 600;
}

.detail-value .update-link:hover {
    color: #fff;
}

.detail-value .readonly-text {
    padding: 10px 14px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    display: block;
    color: rgba(255,255,255,0.5);
}

/* ---------- RULES CONTENT ---------- */
.rules-content {
    margin: 20px 0;
}

.rule-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 14px 16px;
    margin-bottom: 8px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.04);
    transition: all 0.3s ease;
}

.rule-item:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,215,0,0.1);
    transform: translateX(5px);
}

.rule-item .rule-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
}

.rule-item .rule-text {
    color: rgba(255,255,255,0.85);
    font-size: 0.95rem;
    line-height: 1.6;
    flex: 1;
}

.rule-item .rule-text .highlight {
    color: #ffd700;
    font-weight: 700;
}

.rule-item .rule-text .danger {
    color: #ff6b6b;
    font-weight: 700;
}

.rule-item .rule-text .time {
    color: #4ade80;
    font-weight: 700;
}

/* ---------- WARNING BOX ---------- */
.warning-box {
    background: rgba(255,107,107,0.08);
    border: 2px solid rgba(255,107,107,0.2);
    border-radius: 12px;
    padding: 18px 20px;
    margin-top: 20px;
    text-align: center;
}

.warning-box .warning-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 5px;
}

.warning-box h3 {
    color: #ff6b6b;
    font-size: 1.1rem;
    margin: 0 0 5px 0;
}

.warning-box p {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    margin: 0;
}

.warning-box .banned-text {
    color: #ff6b6b;
    font-weight: 800;
    font-size: 1.2rem;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ---------- FORM STYLES ---------- */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    color: rgba(255,255,255,0.7);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.form-group label .required {
    color: #ff6b6b;
    margin-left: 2px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255,255,255,0.25);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #ffd700;
    background: rgba(255,255,255,0.08);
    box-shadow: 0 0 20px rgba(255,215,0,0.06);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group select option {
    background: #0a0a2e;
    color: #fff;
}

.form-group .field-hint {
    color: rgba(255,255,255,0.2);
    font-size: 0.7rem;
    margin-top: 4px;
}

/* ---------- CHECKBOX ---------- */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #ffd700;
    cursor: pointer;
}

.checkbox-group label {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    cursor: pointer;
}

.checkbox-group label .highlight {
    color: #ffd700;
    font-weight: 600;
}

/* ---------- FILE UPLOAD ---------- */
.file-upload-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

.file-upload-wrapper input[type=file] {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-wrapper input[type=file]:hover {
    border-color: rgba(255,215,0,0.2);
    background: rgba(255,255,255,0.06);
}

.file-upload-wrapper input[type=file]::-webkit-file-upload-button {
    background: rgba(255,215,0,0.15);
    color: #ffd700;
    padding: 6px 16px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-wrapper input[type=file]::-webkit-file-upload-button:hover {
    background: rgba(255,215,0,0.25);
}

/* ---------- BUTTONS ---------- */
.btn,
.profile-actions .btn,
.rules-footer .btn {
    padding: 10px 24px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, #ffd700, #f9a825);
    color: #0a0a2e;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255,215,0,0.3);
}

.btn-secondary {
    background: rgba(255,255,255,0.06);
    color: #e0e0e0;
    border: 1px solid rgba(255,255,255,0.1);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.12);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: #fff;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255,107,107,0.3);
}

.btn-success {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: #0a0a2e;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(74,222,128,0.3);
}

.btn-submit {
    background: linear-gradient(135deg, #ffd700, #f9a825);
    color: #0a0a2e;
    padding: 14px 30px;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255,215,0,0.3);
}

.btn-group,
.profile-actions,
.rules-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
}

/* ---------- INFO NOTE ---------- */
.info-note {
    margin-top: 15px;
    padding: 15px 18px;
    background: rgba(255,215,0,0.06);
    border: 1px solid rgba(255,215,0,0.08);
    border-radius: 10px;
    text-align: center;
}

.info-note p {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.6;
}

.info-note .highlight {
    color: #ffd700;
    font-weight: 600;
}

/* ---------- FLOATING BUTTONS ---------- */
.floating-buttons {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
}

.floating-buttons .btn-float {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-buttons .btn-float:hover {
    transform: scale(1.1);
}

.floating-buttons .btn-top {
    background: linear-gradient(135deg, #ffd700, #f9a825);
    color: #0a0a2e;
}

.floating-buttons .btn-refresh {
    background: rgba(255,255,255,0.08);
    color: #e0e0e0;
    border: 1px solid rgba(255,255,255,0.08);
}

.floating-buttons .btn-refresh:hover {
    background: rgba(255,255,255,0.15);
}

/* ---------- FOOTER ---------- */
.profile-footer {
    text-align: center;
    padding: 20px 0 5px 0;
    color: rgba(255,255,255,0.15);
    font-size: 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.03);
    margin-top: 25px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
    .profile-card,
    .rules-card,
    .market-card {
        padding: 20px 16px;
    }
    
    .profile-name {
        font-size: 1.4rem;
    }
    
    .profile-avatar img {
        width: 90px;
        height: 90px;
    }
    
    .detail-row {
        flex-direction: column;
        gap: 4px;
    }
    
    .detail-label {
        min-width: auto;
        font-size: 0.75rem;
    }
    
    .detail-value {
        font-size: 0.85rem;
    }
    
    .profile-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        padding: 10px;
    }
    
    .profile-stats .stat-item .stat-number {
        font-size: 1.2rem;
    }
    
    .nav-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    
    .nav-bar .nav-links {
        justify-content: center;
    }
    
    .nav-bar .user-info {
        text-align: center;
    }
    
    .rules-header h1,
    .card-header h1 {
        font-size: 1.5rem;
    }
    
    .rule-item {
        padding: 12px 14px;
        gap: 12px;
    }
    
    .rule-item .rule-text {
        font-size: 0.88rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .profile-card,
    .rules-card,
    .market-card {
        padding: 16px 12px;
        border-radius: 16px;
    }
    
    .profile-name {
        font-size: 1.2rem;
    }
    
    .profile-avatar img {
        width: 75px;
        height: 75px;
    }
    
    .profile-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .profile-stats .stat-item .stat-number {
        font-size: 1rem;
    }
    
    .profile-actions {
        flex-direction: column;
    }
    
    .profile-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .floating-buttons .btn-float {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }
    
    .rules-header h1,
    .card-header h1 {
        font-size: 1.2rem;
    }
    
    .rules-header p,
    .card-header p {
        font-size: 0.8rem;
    }
    
    .rule-item {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .rule-item .rule-number {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    
    .rule-item .rule-text {
        font-size: 0.82rem;
    }
    
    .warning-box {
        padding: 14px 16px;
    }
    
    .warning-box h3 {
        font-size: 0.95rem;
    }
    
    .rules-footer .btn {
        padding: 8px 18px;
        font-size: 0.8rem;
    }
    
    .form-group {
        margin-bottom: 14px;
    }
    
    .form-group label {
        font-size: 0.8rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 8px 10px;
        font-size: 0.85rem;
        border-radius: 8px;
    }
    
    .btn-submit,
    .btn-secondary {
        padding: 10px 16px;
        font-size: 0.85rem;
        border-radius: 10px;
    }
    
    .checkbox-group label {
        font-size: 0.8rem;
    }
    
    .info-note p {
        font-size: 0.8rem;
    }
}

/* ---------- UTILITY ---------- */
.text-gold { color: #ffd700; }
.text-muted { color: rgba(255,255,255,0.3); }
.text-center { text-align: center; }
.mt-10 { margin-top: 10px; }
.mb-10 { margin-bottom: 10px; }