* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    background-color: #f7f7f8;
    color: #282829;
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: #2e69ff;
    word-break: break-word;
    overflow-wrap: break-word;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

header {
    position: sticky;
    top: 0;
    background-color: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    max-width: 1100px;
    margin: 0 auto;
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
}

.logo {
    height: 28px;
    margin-right: 24px;
    color: #b92b27;
}

.nav-icons {
    display: flex;
    gap: 16px;
}

.nav-icons i {
    font-size: 20px;
    color: #666;
}

.search-container {
    display: flex;
    align-items: center;
    background-color: #f1f2f2;
    border-radius: 4px;
    padding: 6px 12px;
    margin-right: 12px;
    width: 240px;
}

.search-container i {
    color: #666;
    margin-right: 8px;
}

.search-container input {
    border: none;
    background: transparent;
    width: 100%;
    outline: none;
}

.try-button {
    padding: 6px 12px;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-right: 12px;
    font-weight: 500;
}

.user-avatar {
    width: 30px;
    height: 30px;
    background-color: purple;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 12px;
    font-weight: bold;
}

.add-question-btn {
    background-color: #b92b27;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
}

main {
    max-width: 1100px;
    margin: 24px auto;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    padding: 0 16px;
}

.question-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    max-width: 100%;
    overflow-x: hidden;
}

.question-header {
    grid-column: 1 / -1;
    padding: 16px;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    overflow-x: hidden;
}

.question-header h1 {
    font-size: 20px;
    margin-bottom: 12px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.question-stats {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 14px;
}

.sort-value {
    font-weight: 500;
}

.related-questions {
    grid-column: 2;
    grid-row: 2;
    background-color: white;
    border-radius: 4px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    align-self: start;
    position: sticky;
    top: 80px;
    max-width: 100%;
    overflow-x: hidden;
}

.related-questions h3 {
    font-size: 16px;
    margin-bottom: 12px;
}

.related-questions ul {
    list-style-type: none;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.related-questions li {
    margin-bottom: 12px;
    font-size: 14px;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.related-questions a {
    display: block;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.4;
}

.answers-section {
    grid-column: 1;
    grid-row: 2;
    max-width: 100%;
    overflow-x: hidden;
}

.answer {
    background-color: white;
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    overflow-x: hidden;
}

.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.user-details {
    flex-grow: 1;
    margin-left: 12px;
}

.user-name {
    font-weight: 500;
}

.user-credentials {
    font-size: 13px;
    color: #666;
}

.follow-btn {
    color: #2e69ff;
    font-weight: 500;
    font-size: 14px;
    padding: 4px 8px;
}

.answer-content {
    margin-bottom: 16px;
}

.answer-content p {
    margin-bottom: 12px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.answer-actions {
    border-top: 1px solid #e6e6e6;
    padding-top: 12px;
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.action-buttons button {
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.related-questions-footer {
    display: none;
}

footer {
    display: none;
}

.nav-icons a {
    color: inherit;
    text-decoration: none;
    display: inline-block;
}

.nav-icons i {
    font-size: 20px;
    color: #666;
}

.nav-icons a {
    margin-right: 16px;
}

.nav-icons a:last-child {
    margin-right: 0;
}

.nav-icons a:hover i {
    color: #b92b27;
}

.app-screenshots {
    position: relative;
    margin: 16px 0;
    width: 100%;
}

.screenshot-container {
    width: 100%;
    position: relative;
    margin-bottom: 16px;
}

.screenshot-slider {
    display: block;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16/9;
    position: relative;
    border-radius: 12px;
    background-color: #f8f9fa;
}

.screenshot {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    object-fit: contain;
    border-radius: 12px;
}

.screenshot.active {
    opacity: 1;
    z-index: 2;
}

.thumbnail-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: none;
    max-width: 100%;
}

.thumbnail-row::-webkit-scrollbar {
    display: none;
}

.thumbnail {
    width: 120px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    border: 2px solid transparent;
    opacity: 0.7;
}

.thumbnail:hover {
    transform: scale(1.05);
    opacity: 1;
}

.thumbnail.active {
    border-color: #018058;
    opacity: 1;
}

.slider-controls {
    display: flex;
    justify-content: space-between;
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    z-index: 10;
    padding: 0 12px;
}

.slider-btn {
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 10;
    transition: background-color 0.2s;
}

.slider-btn:hover {
    background-color: rgba(255, 255, 255, 0.95);
}

.fullscreen-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.fullscreen-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    background: none;
    border: none;
}

@media (max-width: 1024px) {
    .question-container {
        grid-template-columns: 1fr;
    }
    
    .related-questions {
        display: none;
    }
    
    .related-questions-footer {
        display: block;
        background-color: white;
        padding: 16px;
        margin-top: 24px;
        border-radius: 4px;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .related-questions-footer h3 {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .related-questions-footer ul {
        list-style-type: none;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .related-questions-footer li {
        margin-bottom: 12px;
        font-size: 14px;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        line-height: 1.4;
    }
    
    .related-questions-footer a {
        display: block;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        line-height: 1.4;
        padding: 2px 0;
    }
    
    footer {
        display: block;
        margin-bottom: 24px;
        max-width: 100%;
        overflow-x: hidden;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 8px;
        overflow-x: hidden;
    }
    
    .nav-icons {
        gap: 12px;
    }
    
    .search-container {
        width: 120px;
        min-width: 100px;
    }
    
    .question-header h1 {
        font-size: 18px;
        word-wrap: break-word;
        line-height: 1.3;
    }
    
    main {
        padding: 0 8px;
    }
    
    .related-questions-footer {
        padding: 12px;
    }
    
    .related-questions-footer li {
        font-size: 13px;
        margin-bottom: 10px;
    }
}

@media (max-width: 576px) {
    .nav-left .nav-icons {
        display: none;
    }
    
    .try-button {
        display: none;
    }
    
    .search-container {
        width: 100px;
        min-width: 80px;
    }
    
    .add-question-btn {
        font-size: 12px;
        padding: 6px 8px;
    }
    
    .question-header h1 {
        font-size: 16px;
        word-wrap: break-word;
        line-height: 1.3;
    }
    
    .answer {
        padding: 12px;
    }
    
    .action-buttons {
        font-size: 12px;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    main {
        padding: 0 4px;
    }
    
    .related-questions-footer {
        padding: 8px;
    }
    
    .related-questions-footer li {
        font-size: 12px;
        margin-bottom: 8px;
    }
}