/* ========================================
   PROFILE PAGE STYLES - LEONIDA BRASIL
   ======================================== */

/* Profile Container */
.profile-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
    align-items: flex-start;
}

@media (max-width: 768px) {
    .profile-container {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px;
    }
}

/* ========================================
   PROFILE HEADER
   ======================================== */

.profile-header {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    grid-column: 1 / -1;
}

.profile-cover {
    height: 200px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    position: relative;
    overflow: hidden;
}

.cover-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 0, 127, 0.8), rgba(0, 191, 255, 0.8));
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.profile-main-info {
    padding: 0 24px 24px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
    position: relative;
}

.profile-avatar-section {
    flex-shrink: 0;
}

.profile-avatar-wrapper {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    background: white;
    padding: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    margin-top: -60px;
    position: relative;
    z-index: 2;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
}

.profile-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 20px;
}

.profile-name-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-username {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.2;
}

.profile-title {
    font-size: 14px;
    color: var(--color-primary);
    font-weight: 600;
    background: rgba(255, 0, 127, 0.1);
    padding: 4px 12px;
    border-radius: 12px;
    display: inline-block;
    width: fit-content;
}

.profile-website {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 13px;
}

.profile-website .fa {
    color: var(--color-primary);
    font-size: 12px;
}

.profile-website a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

.profile-website a:hover {
    text-decoration: underline;
}

.profile-stats {
    display: flex;
    gap: 24px;
}

.stat-card {
    text-align: center;
    background: var(--bg-light);
    border-radius: 8px;
    padding: 12px 16px;
    min-width: 80px;
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.stat-card:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.stat-number {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 11px;
    color: var(--text-medium);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.profile-follow-btn {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-follow-btn:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 0, 127, 0.3);
}

/* ========================================
   PROFILE CONTENT
   ======================================== */

.profile-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ========================================
   WALL SECTION
   ======================================== */

.profile-wall {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.wall-header {
    background: linear-gradient(135deg, var(--color-accent), #f39c12);
    color: white;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.wall-header h2 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wall-header .fa {
    font-size: 14px;
}

.wall-post {
    padding: 20px;
    display: flex;
    gap: 16px;
    border-bottom: 1px solid var(--bg-light);
}

.wall-post:last-child {
    border-bottom: none;
}

.wall-post-avatar {
    flex-shrink: 0;
}

.wall-post-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--border-light);
}

.wall-post-content {
    flex: 1;
    min-width: 0;
}

.wall-post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.wall-post-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.author-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--color-accent);
    color: #333;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 600;
}

.author-badge.verified .fa {
    color: #d68910;
}

.wall-post-time {
    font-size: 11px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.wall-post-text {
    font-size: 13px;
    color: var(--text-dark);
    line-height: 1.5;
}

/* ========================================
   TOPICS SECTION
   ======================================== */

.profile-topics {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.topics-header {
    background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-dark));
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topics-header h2 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.topics-label {
    font-weight: 400;
}

.topics-highlight {
    font-weight: 700;
}

.topics-search {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.topics-search-input {
    background: transparent;
    border: none;
    color: white;
    padding: 6px 12px;
    font-size: 12px;
    width: 150px;
    outline: none;
}

.topics-search-input::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

.topics-search-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.topics-search-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--bg-light);
}

.topic-card {
    background: white;
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    transition: all 0.2s ease;
    cursor: pointer;
}

.topic-card:hover {
    background: var(--bg-light);
    transform: translateY(-1px);
}

.topic-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--border-light);
}

.topic-content {
    flex: 1;
    min-width: 0;
}

.topic-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 8px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.topic-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.topic-author {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-medium);
}

.topic-author img {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.topic-author span {
    font-weight: 600;
}

.topic-time {
    color: var(--text-light);
    font-weight: 400;
}

.topic-stats {
    display: flex;
    gap: 8px;
    font-size: 10px;
    color: var(--text-light);
}

.topic-replies,
.topic-views {
    display: flex;
    align-items: center;
    gap: 3px;
}

.topic-stats .fa {
    color: var(--color-primary);
}

/* ========================================
   PROFILE SIDEBAR
   ======================================== */

.profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* About Section */
.about-section {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.about-header {
    background: var(--color-success);
    color: white;
    padding: 12px 16px;
}

.about-header h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.about-username {
    font-weight: 700;
}

.about-content {
    padding: 16px;
}

.about-content p {
    font-size: 13px;
    color: var(--text-dark);
    line-height: 1.5;
    margin: 0;
    font-style: italic;
}

/* Favorites Section */
.favorites-section {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.favorites-header {
    background: var(--color-primary);
    color: white;
    padding: 12px 16px;
}

.favorites-header h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.favorites-tags {
    padding: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    background: var(--bg-light);
    color: var(--text-dark);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
    cursor: pointer;
}

.tag-item:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-1px);
}

/* Activity Section */
.activity-section {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.activity-header {
    background: var(--color-warning);
    color: #333;
    padding: 12px 16px;
}

.activity-header h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.activity-list {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: var(--bg-light);
    border-radius: 6px;
    font-size: 12px;
    transition: background 0.2s ease;
}

.activity-item:hover {
    background: white;
    box-shadow: var(--shadow-sm);
}

.activity-item .fa {
    color: var(--color-primary);
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.activity-item span:first-of-type {
    flex: 1;
    color: var(--text-dark);
    font-weight: 500;
}

.activity-time {
    color: var(--text-light);
    font-size: 10px;
    white-space: nowrap;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
    .profile-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 16px;
    }

    .profile-sidebar {
        order: -1;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 16px;
    }

    .topics-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .profile-main-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 16px;
        padding: 0 16px 20px;
    }

    .profile-avatar-wrapper {
        margin-top: -40px;
        width: 100px;
        height: 100px;
    }

    .profile-stats {
        justify-content: center;
        flex-wrap: wrap;
        gap: 16px;
    }

    .topics-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .topics-search {
        align-self: stretch;
    }

    .topics-search-input {
        width: 100%;
    }

    .wall-post {
        padding: 16px;
        flex-direction: column;
        gap: 12px;
    }

    .wall-post-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .topic-card {
        padding: 12px;
    }

    .topic-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .profile-container {
        padding: 12px;
    }

    .profile-header {
        margin-bottom: 16px;
    }

    .profile-cover {
        height: 150px;
    }

    .profile-username {
        font-size: 22px;
    }

    .profile-main-info {
        padding: 0 12px 16px;
    }

    .profile-avatar-wrapper {
        width: 80px;
        height: 80px;
        margin-top: -30px;
    }

    .stat-card {
        min-width: 70px;
        padding: 8px 12px;
    }

    .stat-number {
        font-size: 16px;
    }

    .wall-header,
    .topics-header,
    .about-header,
    .favorites-header,
    .activity-header {
        padding: 12px 16px;
    }

    .wall-post {
        padding: 12px;
    }

    .topic-card {
        padding: 10px;
    }

    .topic-title {
        font-size: 12px;
    }

    .profile-sidebar {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.profile-header {
    animation: slideInUp 0.6s ease-out;
}

.profile-wall {
    animation: slideInUp 0.8s ease-out;
}

.profile-topics {
    animation: slideInUp 1s ease-out;
}

.profile-sidebar > * {
    animation: fadeInScale 0.6s ease-out;
}

.profile-sidebar > *:nth-child(1) {
    animation-delay: 0.1s;
}

.profile-sidebar > *:nth-child(2) {
    animation-delay: 0.2s;
}

.profile-sidebar > *:nth-child(3) {
    animation-delay: 0.3s;
}

.topic-card {
    animation: fadeInScale 0.4s ease-out;
}

.topic-card:nth-child(1) { animation-delay: 0.1s; }
.topic-card:nth-child(2) { animation-delay: 0.15s; }
.topic-card:nth-child(3) { animation-delay: 0.2s; }
.topic-card:nth-child(4) { animation-delay: 0.25s; }
.topic-card:nth-child(5) { animation-delay: 0.3s; }
.topic-card:nth-child(6) { animation-delay: 0.35s; }
.topic-card:nth-child(7) { animation-delay: 0.4s; }
.topic-card:nth-child(8) { animation-delay: 0.45s; }

/* ========================================
   HOVER EFFECTS
   ======================================== */

.profile-avatar-wrapper:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.stat-card:hover .stat-number {
    color: var(--color-primary-dark);
}

.wall-post:hover {
    background: rgba(255, 0, 127, 0.02);
}

.tag-item:hover {
    transform: translateY(-2px) scale(1.05);
}

.topic-card:hover .topic-title {
    color: var(--color-primary);
}

/* ========================================
   LOADING STATES
   ======================================== */

.topics-loading {
    padding: 40px;
    text-align: center;
    color: var(--text-light);
}

.topics-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-primary);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}



/* ========================================
   ACCESSIBILITY
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .cover-gradient {
        animation: none;
    }
}

/* Focus indicators */
.profile-follow-btn:focus-visible,
.topics-search-input:focus-visible,
.topics-search-btn:focus-visible,
.topic-card:focus-visible,
.tag-item:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}


