/* andreas02 - a free xhtml/css website layout by Andreas Viklund - http://andreasviklund.com - Free to use for any purpose as long as the proper credits are given to the original author.

Version: 2.0 (Jan 29, 2007)

Screen layout: */

body {
padding:15px 0 0 0;
margin:0;
font:76% tahoma, verdana, sans-serif;
background:#e0e0e0;
color:#303030;
}

a {
color:#303030;
text-decoration:none;
border-bottom:1px dotted #505050;
}

a:hover {
color:#303030;
text-decoration:none;
border-bottom:1px solid #505050;
}

h1 {
margin:0 0 20px 0;
font-size:2.2em;
font-weight:normal;
}

h2 {
margin:0 0 12px 0;
font-size:1.6em;
font-weight:normal;
}

h3 {
margin:0 0 10px 0;
font-size:1.4em;
font-weight:normal;
}

p {
margin:0 0 15px 0;
line-height:1.5em;
text-align:left;
}

a img {
border:0;
}

/* Main container */

#container {
margin:0 auto 20px auto;
width:730px;
padding:5px 20px 20px 20px;
background:#ffffff;
}

/* Site title section */

#logo {
margin:15px 0 0 0;
}

#logo h1 a {
color:#505050;
border:none;
}

#logo h1 a:hover {
color:#303030;
text-decoration:none;
border:none;
}

/* Toptab menu */

#toptabs {
margin:10px auto -13px auto;
font-size:0.8em;
width:760px;
}

#toptabs p {
text-align:right;
color:#808080;
}

.toptab {
padding:4px 5px 3px 5px;
margin:0 0 0 4px;
text-decoration:none;
background:#f0f0f0 url(images/corner2.gif) top right no-repeat;
color:#808080;
border-bottom:1px solid #e0e0e0;
}

.toptab:hover {
background:#fafafa url(images/corner2.gif) top right no-repeat;
border-bottom:1px solid #eaeaea;
color:#505050;
text-decoration:none;
}

.activetoptab {
padding:4px 5px 3px 5px;
margin:0 0 0 4px;
color:#505050;
text-decoration:none;
background:#ffffff url(images/corner2.gif) top right no-repeat;
border-bottom:1px solid #ffffff;
}

.activetoptab:hover {
text-decoration:none;
border-bottom:1px solid #ffffff;
}

/* Navitab menu */

#navitabs {
clear:both;
}

.navitab {
padding:4px 8px 4px 8px;
margin:0 0 4px 0;
text-decoration:none;
font-size:1.1em;
background:#e0e0e0 url(images/corner.gif) top right no-repeat;
border-bottom:1px solid #ffffff;
border-left:1px solid #ffffff;
}

.navitab:hover {
text-decoration:none;
background:#d0d0d0 url(images/corner.gif) top right no-repeat;
border-bottom:1px solid #ffffff;
}

.activenavitab {
padding:4px 8px 5px 8px;
color:#ffffff;
margin:0 0 5px 0;
font-size:1.1em;
text-decoration:none;
background:#505050 url(images/corner.gif) top right no-repeat;
}

.activenavitab:hover {
text-decoration:none;
color:#ffffff;
}

/* Header description */

#desc {
height:200px;
color:#ffffff;
padding:0;
background:#505050 url(images/front.jpg) top left no-repeat;
clear:both;
margin:5px 0 15px 0;
}

#desc p {
width:290px;
font-size:1em;
line-height:1.3em;
padding:0 0 0 15px;
}

#desc h2 {
padding:15px 15px 0 15px;
color:#ffffff;
}

#desc a {
color:#ffffff;
text-decoration:none;
border-color:#ffffff;
}

/* Main content */

#main {
width:550px;
float:left;
padding:0 15px 0 0;
margin:0;
border-right:1px solid #d8d8d8;
}

/* Sidebar */

#sidebar {
width:150px;
float:right;
}

#sidebar p {
font-size:0.9em;
line-height:1.3em;
margin:0 0 15px 0;
}

/* Footer */

#footer {
clear:both;
background:#fafafa;
padding:0;
margin:0;
border-top:1px solid #d8d8d8;
}

#footer a {
color:#808080;
}

#footer a:hover {
color:#303030;
}

#footer p {
color:#808080;
font-size:1.1em;
line-height:1.3em;
margin:15px 0 0 0;
padding:0;
}

/* Various classes */

.photo {
    float: left;
    margin: 0 15px 10px 0;
}

.right {
margin-top:-8px;
text-align:right;
}

.block {
background:#f0f0f0;
padding:10px;
}

.sidelink {
text-align:left;
display:block;
width:140px;
background:#f0f0f0 url(images/corner.gif) top right no-repeat;
padding:3px 4px 3px 8px;
margin:5px 10px 5px 0;
border:none;
}

.sidelink:hover {
background:#e0e0e0 url(images/corner.gif) top right no-repeat;
text-decoration:none;
border:none;
}

.hide {
display:none;
}

/* Forum styles - ИСПРАВЛЕНО */
.forum-post {
background:#f8f8f8;
border:1px solid #d8d8d8;
margin:0 0 15px 0;
padding:0;
}

.forum-post-header {
background:#505050;
color:#ffffff;
padding:5px 10px;
font-size:0.9em;
}

.forum-post-header a {
color:#ffffff;
border-color:#ffffff;
}

.forum-post-content {
padding:10px;
display:table;
width:100%;
box-sizing:border-box;
}

.forum-user {
vertical-align:top;
width:130px;
background:#f0f0f0;
padding:10px;
font-size:0.85em;
text-align:center;
border:1px solid #d8d8d8;
}

.forum-user img {
display:block;
border:1px solid #808080;
margin:0 auto 8px auto;
max-width:60px;
height:auto;
}

.forum-user strong {
display:block;
margin-bottom:5px;
word-wrap:break-word;
}

.forum-message {
display:table-cell;
vertical-align:top;
padding:5px 0 5px 15px;
}

.post-info {
color:#808080;
font-size:0.8em;
margin:5px 0;
}

/* Forms */
.form-container {
background:#f8f8f8;
border:1px solid #d8d8d8;
padding:15px;
margin:15px 0;
}

.form-row {
margin:0 0 10px 0;
}

.form-row label {
display:block;
font-weight:bold;
margin:0 0 3px 0;
}

.form-row input, .form-row textarea, .form-row select {
border:1px solid #d8d8d8;
padding:3px;
font-family:tahoma, verdana, sans-serif;
font-size:1em;
}

.form-row input[type="text"], .form-row input[type="password"], .form-row input[type="email"] {
width:200px;
}

.form-row textarea {
width:400px;
height:100px;
}

.form-row select {
width:150px;
}

.form-submit {
background:#606cd1;
color:#ffffff;
border:none;
padding:5px 15px;
cursor:pointer;
margin:10px 0;
}

.form-submit:hover {
background:#404040;
}

/* News styles */
.news-item {
border-bottom:1px solid #e0e0e0;
margin:0 0 20px 0;
padding:0 0 15px 0;
}

.news-item h3 {
margin:0 0 5px 0;
}

.news-item h3 a {
color:#505050;
border:none;
}

.news-item h3 a:hover {
color:#303030;
}

.news-meta {
color:#808080;
font-size:0.8em;
margin:0 0 10px 0;
}

.news-excerpt {
margin:10px 0;
}

.read-more {
font-weight:bold;
}

/* Profile styles */
.profile-info {
background:#f8f8f8;
border:1px solid #d8d8d8;
padding:15px;
margin:15px 0;
}

.profile-avatar {
float:left;
margin:0 15px 10px 0;
border:1px solid #808080;
}

.profile-details {
margin-left:100px;
}

.profile-stats {
background:#f0f0f0;
padding:10px;
margin:15px 0;
border:1px solid #d8d8d8;
}

/* Breadcrumbs */
.breadcrumbs {
color:#808080;
font-size:0.9em;
margin:0 0 15px 0;
}

.breadcrumbs a {
color:#808080;
}

/* Error/Success messages */
.message {
padding:10px;
margin:15px 0;
border:1px solid;
}

.message-success {
background:#e7f5e7;
border-color:#5cb85c;
color:#3c763d;
}

.message-error {
background:#f8e7e7;
border-color:#d9534f;
color:#a94442;
}

/* Mobile adaptations - minimal changes only */

@media screen and (max-width: 800px) {
#container {
width: 95%;
margin: 0 auto 20px auto;
}

#toptabs {
width: 95%;
margin: 10px auto -13px auto;
}
}

@media screen and (max-width: 600px) {
#main {
width: auto;
float: none;
border-right: none;
margin-bottom: 20px;
padding-bottom: 20px;
border-bottom: 1px solid #d8d8d8;
}

#sidebar {
width: auto;
float: none;
}

#desc {
height: auto;
min-height: 120px;
}

#desc p {
width: auto;
}

.photo {
max-width: 100%;
height: auto;
}

/* Адаптация форума для мобильных */
.forum-post-content {
display:block;
}

.forum-user {
display:block;
width:auto;
margin:0 0 10px 0;
}

.forum-message {
display:block;
padding:5px 0;
}

.form-row input[type="text"], .form-row input[type="password"], .form-row input[type="email"] {
width: 90%;
max-width: 300px;
}

.form-row textarea {
width: 90%;
max-width: 400px;
}

.profile-avatar {
float: none;
display: block;
margin: 0 auto 10px auto;
}

.profile-details {
margin-left: 0;
text-align: center;
}
}

/* Стили для редактирования профиля */
.avatar-section {
background: #f8f8f8;
border: 1px solid #d8d8d8;
padding: 15px;
margin: 15px 0;
border-radius: 4px;
}

.current-avatar {
text-align: center;
margin-bottom: 15px;
}

.current-avatar h4 {
margin: 0 0 10px 0;
font-size: 1em;
color: #505050;
}

.profile-avatar-preview {
max-width: 100px;
max-height: 100px;
border: 1px solid #808080;
border-radius: 4px;
display: block;
margin: 0 auto 10px auto;
}

.avatar-controls {
margin-top: 10px;
}

.avatar-controls label {
font-weight: normal !important;
margin: 0;
}

.no-avatar {
color: #666;
}

.no-avatar p {
margin: 10px 0 0 0;
font-style: italic;
}

.form-buttons {
margin-top: 25px;
padding-top: 15px;
border-top: 1px solid #e0e0e0;
}

.form-row small {
display: block;
color: #666;
font-size: 0.85em;
margin-top: 3px;
line-height: 1.3em;
}

.form-row input[disabled] {
background-color: #f5f5f5;
color: #666;
cursor: not-allowed;
}

.profile-help {
margin-top: 20px;
}

.profile-help h3 {
color: #505050;
}

.char-counter {
font-size: 0.8em;
color: #666;
text-align: right;
margin-top: 5px;
}

/* Улучшения для мобильных устройств */
@media screen and (max-width: 600px) {
.form-row input[type="text"], 
.form-row input[type="email"],
.form-row input[type="url"] {
width: 100%;
max-width: none;
box-sizing: border-box;
}

.form-row textarea {
width: 100%;
max-width: none;
box-sizing: border-box;
}

.avatar-section {
padding: 10px;
}

.profile-avatar-preview {
max-width: 80px;
max-height: 80px;
}

.form-buttons .form-submit {
display: block;
width: 100%;
margin: 5px 0;
text-align: center;
box-sizing: border-box;
}
}
/* Стили для BBCode цитат на форуме */

.forum-quote {
    background: #f8f9fa;
    border-left: 4px solid #007bff;
    margin: 15px 0;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #dee2e6;
}

.quote-header {
    background: #e3f2fd;
    padding: 8px 12px;
    font-size: 0.9em;
    color: #1565c0;
    border-bottom: 1px solid #bbdefb;
    font-weight: 600;
}

.quote-content {
    padding: 12px;
    background: #ffffff;
    line-height: 1.5;
    color: #212529;
    font-weight: 400;
}

/* Стили для упоминаний пользователей */
.forum-mention {
    color: #007bff;
    font-weight: bold;
    background: #e7f3ff;
    padding: 2px 4px;
    border-radius: 3px;
    text-decoration: none;
    border: 1px solid #bee5eb;
}

.forum-mention:hover {
    background: #d1ecf1;
    color: #0056b3;
}

/* Вложенные цитаты */
.forum-quote .forum-quote {
    margin: 10px 0;
    border-left-color: #6c757d;
    background: #f1f3f4;
}

.forum-quote .forum-quote .quote-header {
    background: #e0e0e0;
    color: #424242;
    font-size: 0.85em;
    font-weight: 600;
}

.forum-quote .forum-quote .quote-content {
    background: #fafafa;
    color: #212529;
    font-weight: 400;
}

/* Стили для цитат третьего уровня */
.forum-quote .forum-quote .forum-quote {
    border-left-color: #adb5bd;
    background: #f8f9fa;
}

.forum-quote .forum-quote .forum-quote .quote-header {
    background: #f0f0f0;
    color: #495057;
    font-size: 0.8em;
    font-weight: 600;
}

.forum-quote .forum-quote .forum-quote .quote-content {
    background: #ffffff;
    color: #212529;
    font-weight: 400;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .forum-quote {
        margin: 10px 0;
        border-radius: 2px;
    }
    
    .quote-header {
        padding: 6px 8px;
        font-size: 0.85em;
    }
    
    .quote-content {
        padding: 8px;
    }
    
    .forum-mention {
        padding: 1px 3px;
        font-size: 0.9em;
    }
}

/* Стили для темной темы (если используется) */
@media (prefers-color-scheme: dark) {
    .forum-quote {
        background: #2d3748;
        border-left-color: #4299e1;
        border-color: #4a5568;
    }
    
    .quote-header {
        background: #4a5568;
        color: #e2e8f0;
        border-bottom-color: #2d3748;
        font-weight: 600;
    }
    
    .quote-content {
        background: #1a202c;
        color: #6770d2;
        font-weight: 400;
    }
    
    .forum-mention {
        background: #2c5282;
        color: #bee3f8;
        border-color: #2c5282;
    }
    
    .forum-mention:hover {
        background: #2a69ac;
        color: #e6fffa;
    }
    
    .forum-quote .forum-quote .quote-content {
        background: #2d3748;
        color: #e2e8f0;
    }
}

/* Специальные стили для предварительного просмотра */
.preview-content .forum-quote {
    margin: 8px 0;
    border: 1px solid #dee2e6;
}

.preview-content .quote-header {
    padding: 6px 10px;
    font-size: 0.85em;
    background: #e3f2fd;
    color: #1565c0;
    font-weight: 600;
}

.preview-content .quote-content {
    padding: 8px 10px;
    color: #212529;
    background: #ffffff;
    font-weight: 400;
}

/* Анимация появления цитат */
.forum-quote {
    animation: fadeInUp 0.3s ease-out;
}

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