/* ===== БАЗА (минимальный «reset») ===== */
body, h1, h2, h3, p, ul, li, form, dl, dt, dd {
    margin:0; padding:0;
}
body {
    font: 13px Arial, Helvetica, sans-serif;
    color:#222;
    background:#f2f2f2;
}
a { color:#06c; text-decoration:underline; }
a:hover { text-decoration:none; }

/* ===== РАМКА СТРАНИЦЫ ===== */
#page {
    width:760px;
    margin:10px auto;
    background:#fff;
    border:1px solid #ccc;
}
#header {
    background:#e9e9e9;
    padding:10px;
    border-bottom:1px solid #ccc;
}
#header h1 { font-size:20px; }
#header h1 a { text-decoration:none; }
#nav { margin:8px 0 0 0; padding:0; list-style:none; }
#nav li { display:inline; margin-right:10px; }
#nav a { text-decoration:none; }
#content { padding:10px; }
#footer { padding:10px; border-top:1px solid #ccc; color:#666; background:#fafafa; font-size:11px; }

/* ===== СЕТКА (три колонки на float) ===== */
.cols { zoom:1; }                              /* IE5/6 clearfix */
.cols:after { content:"."; display:block; height:0; clear:both; visibility:hidden; }

.col-left   { float:left;  width:180px; }
.col-center { float:left;  width:270px; margin-left:10px; }
.col-right  { float:left;  width:240px; margin-left:10px; }

/* ===== КАРТОЧКИ ===== */
.card { border:1px solid #ddd; background:#fff; margin:10px 0 10px 0; }
.card-h { background:#f5f5f5; border-bottom:1px solid #ddd; padding:6px 8px; font-weight:bold; }
.card-b { padding:8px; }

/* ===== ТАБЫ СЛЕВА ===== */
.tab-nav { list-style:none; margin:0; padding:0; }
.tab-nav li { margin-bottom:6px; }
.tab-nav a {
    display:block;
    padding:6px 8px;
    border:1px solid #ccc;
    background:#fafafa;
    text-decoration:none;
}
.tab-nav a:hover { background:#fff; }
.badge { background:#e3e9ff; border:1px solid #99b; padding:0 4px; font-size:11px; margin-left:4px; }

/* ===== АВАТАР (строго квадрат) ===== */
.avatar-box { width:200px; height:200px; border:1px solid #ccc; background:#ddd; overflow:hidden; }
.avatar-box img { display:block; width:200px; height:200px; border:0; }
.avatar-placeholder { width:200px; height:200px; line-height:200px; text-align:center; color:#666; }

/* ===== СПИСКИ ИНФО/ССЫЛОК ===== */
.info-list { }
.info-list dt { float:left; width:70px; color:#555; }
.info-list dd { margin-left:75px; margin-bottom:6px; }
.link-list { list-style:disc inside; }
.link-list li { margin:3px 0; }

/* ===== ФОРМЫ ===== */
.form-row { margin-bottom:8px; }
.label { display:block; font-weight:bold; margin-bottom:3px; }
.input { width: 150px; padding:3px; border:1px solid #aaa; }
.button {display: inline-block;  padding:4px 10px; border:1px solid #888; background:#eee; cursor:pointer; margin:3px;}

/* ===== ДЕКОР ===== */
.stats { list-style:none; margin:0; padding:0; }
.stats li { margin-bottom:4px; }
.mt8 { margin-top:8px; }



.photo-grid {
    width:750px;
    overflow:hidden;
}

.photo-card {
    float:left;
    width:230px;

    margin:0 10px 10px 0; /* отступ справа и снизу */
    border:1px solid #999;
    background:#f5f5f5;
    text-align:center;
}

.photo-card img {
    display:block;
    width:200px;
    margin:10px auto;
}

.photo-actions {
    background:#eee;
    border-top:1px solid #ccc;
    padding:4px;
}
.img-wrapper{
    height: 270px;
}

/* ===== СТИЛИ ДЛЯ ПОИСКА ===== */
.search-form {
    padding: 15px;
    background: #fafafa;
    border: 1px solid #ddd;
    margin-bottom: 20px;
}

.search-form input[type="text"] {
    width: 220px;
    padding: 5px;
    border: 1px solid #aaa;
    font-size: 14px;
}

.search-form input[type="submit"] {
    padding: 5px 10px;
    border: 1px solid #888;
    background: #eee;
    font-size: 14px;
    cursor: pointer;
}

.search-form input[type="submit"]:hover {
    background: #ccc;
}

/* ===== РЕЗУЛЬТАТЫ ПОИСКА ===== */
.search-results {
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    list-style: none;
}

.search-results li {
    margin-bottom: 12px;
    padding: 10px;
    border: 1px solid #ddd;
    background: #fff;
}

.search-results li:hover {
    background: #f1f1f1;
}

.search-results .user-info {
    font-weight: bold;
    color: #333;
}

.search-results .user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
}

.search-results a {
    text-decoration: none;
    color: #333;
}

.search-results a:hover {
    color: #06c; /* Цвет для кликабельной ссылки при наведении */
}

/* БЛОК СООБЩЕНИЙ*/
.msg-in { background: #f0f0f0; margin: 10px 0; padding: 8px; border-radius: 5px; text-align: left; }
.msg-out { background: #d0f0ff; margin: 10px 0; padding: 8px; border-radius: 5px; text-align: right; }
.msg-meta { font-size: 12px; color: #888; margin-top: 5px; }
.message-thread {
    list-style: none;
    padding: 0;
    margin: 0;
}
.message-thread li {
    padding: 8px;
    margin-bottom: 6px;
    border-radius: 5px;
    max-width: 70%;
}
.message-thread li.me {
    background: #66b2ff;
    margin-left: auto;
}
.message-thread li.them {
    background: #f0f0f0;
}
.msg-meta {
    font-size: 11px;
    color: #666;
    text-align: right;
    margin-top: 5px;
}
.dialogs-table {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    font-size: 14px;
    margin-top: 10px;
}

.dialogs-table td {
    border-bottom: 1px solid #ccc;
    padding: 6px;
}

.dialogs-table a {
    text-decoration: none;
    color: #000;
}

.dialogs-table .date {
    font-size: 11px;
    color: #888;
}

.dialogs-table .badge {
    display: inline-block;
    background: #f00;
    color: #fff;
    font-size: 10px;
    padding: 2px 4px;
    margin-left: 6px;
}

/* СПИСОК ДРУЗЕЙ*/
.friend-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    margin-bottom: 5px;
}
.friend-table th {
    background-color: #eee;
    text-align: left;
    font-weight: bold;
    padding: 6px;
}
.friend-table td {
    padding: 6px;
    vertical-align: middle;
}
.friend-table img {
    width: 48px;
    height: 48px;
    vertical-align: middle;
}
.friend-table .login {
    font-weight: bold;
}
.friend-table a {
    color: #0000cc;
    text-decoration: underline;
    font-size: 11pt;
}



