/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #fafafa;
    color: #262626;
    line-height: 1.6;
}

.container {
    max-width: 935px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #fff;
    border-bottom: 1px solid #dbdbdb;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 935px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #262626;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    color: #262626;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #0095f6;
}

/* Stories Container */
.stories-container {
    background: #fff;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    margin: 24px 0;
    padding: 16px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.stories-container::-webkit-scrollbar {
    display: none;
}

.stories-wrapper {
    display: flex;
    gap: 16px;
    min-width: max-content;
}

.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.story-item:hover {
    transform: scale(1.05);
}

.story-avatar {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.story-avatar.viewed {
    background: #c7c7c7;
}

.story-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
}

.story-username {
    font-size: 12px;
    color: #262626;
    text-align: center;
    max-width: 66px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Story Modal */
.story-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.story-modal.active {
    display: flex;
}

.story-content {
    position: relative;
    max-width: 400px;
    max-height: 80vh;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.story-progress {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    gap: 2px;
    z-index: 10;
}

.progress-bar {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 1px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #fff;
    width: 0%;
    transition: width 0.1s linear;
}

.story-header {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
    margin-top: 20px;
}

.story-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.story-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #fff;
}

.story-user-name {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.story-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
}

.story-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.story-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    padding: 20px;
}

.story-navigation {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 5;
}

.story-prev {
    left: 0;
}

.story-next {
    right: 0;
}

/* Posts */
.post-card {
    background: #fff;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    margin-bottom: 24px;
    overflow: hidden;
}

.post-header {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.post-username {
    font-weight: 600;
    color: #262626;
    text-decoration: none;
}

.post-username:hover {
    text-decoration: underline;
}

.post-media {
    width: 100%;
    max-height: 600px;
    object-fit: cover;
    display: block;
}

.post-content {
    padding: 16px;
}

.post-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 8px;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #262626;
}

.action-btn:hover {
    background-color: #f5f5f5;
}

.action-btn.liked {
    color: #ed4956;
}

.like-count {
    font-weight: 600;
    margin-bottom: 8px;
}

.post-text {
    margin-bottom: 8px;
}

.post-time {
    color: #8e8e8e;
    font-size: 12px;
    text-transform: uppercase;
}

/* Comments */
.comments-section {
    border-top: 1px solid #efefef;
    padding: 16px;
}

.comment {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-username {
    font-weight: 600;
    margin-right: 8px;
}

.comment-text {
    color: #262626;
}

.comment-form {
    display: flex;
    gap: 12px;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #efefef;
}

.comment-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    padding: 8px 0;
    background: transparent;
}

.comment-submit {
    background: none;
    border: none;
    color: #0095f6;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}

.comment-submit:disabled {
    color: #b2dffc;
    cursor: not-allowed;
}

/* Form Styles */
.post-form {
    background: #fff;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #dbdbdb;
    border-radius: 6px;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
}

.form-control:focus {
    outline: none;
    border-color: #0095f6;
}

.file-input {
    margin-bottom: 16px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #0095f6;
    color: #fff;
}

.btn-primary:hover {
    background: #1877f2;
}

.btn-outline {
    background: transparent;
    border: 1px solid #dbdbdb;
    color: #262626;
}

.btn-outline:hover {
    background: #f5f5f5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .header-content {
        padding: 0 16px;
    }
    
    .stories-container {
        margin: 16px 0;
        padding: 12px;
    }
    
    .story-content {
        max-width: 90vw;
        max-height: 90vh;
    }
    
    .post-card {
        margin-bottom: 16px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .nav-links {
        gap: 12px;
    }
    
    .nav-links a {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .story-avatar {
        width: 56px;
        height: 56px;
    }
    
    .story-avatar img {
        width: 50px;
        height: 50px;
    }
    
    .story-username {
        max-width: 56px;
        font-size: 11px;
    }
    
    .stories-wrapper {
        gap: 12px;
    }
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-muted {
    color: #8e8e8e;
}

.mb-3 {
    margin-bottom: 1rem;
}

.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.justify-content-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 1rem;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0095f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

