:root {
    --orkut-blue: #C3D9FF;
    --orkut-dark-blue: #4A6E9B;
    --orkut-mid-blue: #6B8CB8;
    --orkut-nav-bg: #bfd0ea;
    --orkut-pink: #ed217c;
    --orkut-bg: #E4ECF5;
    --orkut-box-bg: #FFFFFF;
    --orkut-row-alt: #EFF4FB;
    --text-color: #000000;
    --text-light: #666666;
    --link-color: #003399;
    --border-color: #99B2E5;
    --border-light: #C3D9FF;
}

* { box-sizing: border-box; }

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: var(--orkut-bg);
    margin: 0; padding: 0;
    color: var(--text-color);
    font-size: 13px;
    overflow-x: hidden;
    width: 100%;
}

a { color: var(--link-color); text-decoration: none; }
a:hover { text-decoration: underline; color: #0022aa; }

.top-nav {
    background: linear-gradient(to bottom, #5a7faa 0%, #3a5f8a 100%);
    color: white; width: 100%;
    border-bottom: 2px solid #2d4e78;
}
.top-nav a { color: white; }
.nav-first-row {
    display: flex; justify-content: space-between; align-items: center; padding: 8px 0;
}
.nav-second-row {
    background: linear-gradient(to bottom, #d2e0f5 0%, #b8cee8 100%);
    border-top: 1px solid #a0bce0;
    border-bottom: 1px solid #8aabda;
    padding: 3px 0; width: 100%;
}
.nav-second-row a {
    color: var(--link-color); margin-right: 12px;
    font-weight: bold; font-size: 11px; display: inline-block; padding: 2px 4px;
}
.nav-second-row a:hover { text-decoration: underline; }
.nav-second-row .active {
    background-color: white; padding: 2px 8px;
    border: 1px solid #99B2E5; border-bottom: none;
    margin-bottom: -3px; color: #000;
}

.container { max-width: 960px; width: 98%; margin: 0 auto; }
.main-container { display: flex; margin-top: 10px; gap: 10px; }
.sidebar { width: 180px; flex-shrink: 0; }
.content { flex-grow: 1; min-width: 0; }

.box {
    background-color: #FFFFFF;
    border: 1px solid var(--border-light);
    border-top: 2px solid var(--orkut-dark-blue);
    margin-bottom: 10px; padding: 10px;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.07);
}
.box-title {
    background: linear-gradient(to bottom, #D9E5F3 0%, #C8D9ED 100%);
    margin: -10px -10px 10px -10px; padding: 4px 10px;
    font-weight: bold; color: var(--orkut-dark-blue);
    font-size: 12px; border-bottom: 1px solid var(--border-color);
}
.center-text { text-align: center; }
.profile-photo {
    width: 100%; border: 1px solid #ccc;
    padding: 2px; background: #fff; display: block;
}
.section-bar {
    background: linear-gradient(to bottom, #D9E5F3 0%, #C8D9ED 100%);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 4px 10px; margin: 15px -10px 15px -10px;
    color: var(--orkut-dark-blue); font-weight: bold; font-size: 12px;
}

.metadata-table { width: 100%; border-collapse: collapse; }
.metadata-table tr:nth-child(even) { background-color: var(--orkut-row-alt); }
.metadata-table td { padding: 5px 10px; border-bottom: 1px solid #e8eefa; }
.metadata-table td:first-child { width: 130px; color: #555; text-align: right; font-weight: bold; font-size: 11px; }

.ratings-container {
    display: flex; justify-content: space-between; align-items: center;
    border: 1px solid var(--border-light); padding: 15px;
    background: linear-gradient(to bottom, #fff 0%, #f5f8ff 100%); margin: 20px 0;
}
.ratings-row { display: flex; gap: 30px; }
.meter { display: flex; flex-direction: column; align-items: center; text-align: center; }
.meter-label { font-size: 11px; color: #666; margin-bottom: 5px; }
.meter-icon { font-size: 16px; margin-right: 2px; }
.meter-count { color: #999; font-size: 9px; }
.fans-section { text-align: center; border-left: 1px dashed #99B2E5; padding-left: 20px; min-width: 80px; }
.fans-title { color: #4A6E9B; display: block; margin-bottom: 2px; font-size: 11px; }
.fans-count { font-size: 18px; font-weight: bold; color: var(--orkut-pink); }
.rate-link { text-decoration: none; font-weight: bold; margin-left: 2px; }

.metrics-row { display: flex; gap: 15px; font-size: 11px; margin: 10px 0; flex-wrap: wrap; }
.metric-item { display: flex; align-items: center; gap: 4px; }

.footer { margin-top: 20px; padding: 20px 0; font-size: 11px; color: #888; text-align: center; border-top: 1px dotted #b5c9e8; }

.index-container { display: flex; justify-content: center; align-items: flex-start; gap: 30px; margin-top: 40px; }
.index-hero-box { background: white; border: 1px solid var(--border-light); padding: 5px; margin-bottom: 20px; }
.index-hero-img { width: 100%; display: block; border: 1px solid #ddd; }
.index-hero-title { color: var(--orkut-pink); font-size: 20px; font-weight: normal; margin-bottom: 15px; }

.auth-box input {
    width: 100%; margin-bottom: 10px; padding: 8px;
    border: 1px solid var(--border-color); font-size: 13px; background: #fafcff;
}
.auth-box input:focus { border-color: var(--orkut-dark-blue); outline: none; background: #fff; }
.login-btn {
    padding: 5px 15px;
    background: linear-gradient(to bottom, #ffffff 0%, #C3D9FF 100%);
    color: #333; border: 1px solid #99B2E5; border-radius: 2px;
    font-weight: bold; cursor: pointer; font-size: 13px;
}
.login-btn:hover { background: linear-gradient(to bottom, #f0f5ff 0%, #b0ccff 100%); }
.signup-btn {
    padding: 10px; background-color: var(--orkut-pink);
    color: white; border: 1px solid #c01a65;
    font-weight: bold; cursor: pointer; font-size: 14px; border-radius: 2px;
}
.signup-btn:hover { background-color: #d01869; }
.auth-box .box-title { font-size: 13px; }

.search-form { display: flex; }
.search-input { border: 1px solid var(--border-color); padding: 2px 5px; font-size: 11px; background: #fafcff; }
.search-input:focus { border-color: var(--orkut-dark-blue); outline: none; }
.search-btn {
    background: linear-gradient(to bottom, #7a9ec5 0%, #5a7ea5 100%);
    color: white; border: 1px solid #365376; padding: 2px 10px;
    font-size: 11px; cursor: pointer; border-radius: 2px;
}
.search-btn:hover { background: linear-gradient(to bottom, #8aaed5 0%, #6a8eb5 100%); }

.stories-container {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 5px;
    scrollbar-width: none;
}
.stories-container::-webkit-scrollbar {
    display: none;
}
.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 68px;
    flex-shrink: 0;
    cursor: pointer;
    text-decoration: none;
}
.story-avatar-ring {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    padding: 2.5px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.15s ease-in-out;
}
.story-avatar-ring.me-no-story {
    background: #e4ecf5;
    border: 2.5px dashed var(--orkut-dark-blue);
    padding: 0;
}
.story-avatar-ring.me-has-story {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}
.story-avatar-ring:hover {
    transform: scale(1.05);
}
.story-avatar-inner {
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 50%;
    padding: 2px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}
.story-avatar-inner img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.story-add-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: #0095f6;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.story-username {
    font-size: 10px;
    color: var(--text-color);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    font-weight: bold;
}

.right-sidebar {
    width: 240px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ad-widget {
    border: 1px solid var(--border-light); border-top: 2px solid var(--orkut-pink);
    background: #fff; padding: 0; margin-bottom: 10px; overflow: hidden;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.06);
}
.ad-widget-title {
    background: linear-gradient(to bottom, #fde8f1 0%, #fad2e4 100%);
    padding: 3px 8px; font-size: 10px; color: #c01a65; font-weight: bold;
    border-bottom: 1px solid #f0b0cf; text-transform: uppercase; letter-spacing: 0.5px;
}
.ad-widget-body { padding: 8px; }
.ad-widget img { width: 100%; display: block; border: 1px solid #eee; margin-bottom: 6px; }
.ad-widget-adname { font-size: 11px; font-weight: bold; color: var(--link-color); display: block; margin-bottom: 3px; }
.ad-widget-desc { font-size: 10px; color: #666; line-height: 1.4; margin-bottom: 6px; }
.ad-widget-link {
    display: inline-block; background: var(--orkut-pink); color: white;
    font-size: 10px; font-weight: bold; padding: 3px 10px; border-radius: 2px; text-decoration: none;
}
.ad-widget-link:hover { background: #c01a65; text-decoration: none; color: white; }

.friend-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.friend-grid-item { text-align: center; font-size: 10px; }
.friend-grid-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border: 1px solid #ccc; padding: 1px; background: #fff; display: block; margin-bottom: 2px; }

.scrap-item { border-bottom: 1px dotted var(--border-light); padding: 10px 5px; }
.scrap-item:last-child { border-bottom: none; }
.scrap-author-img { width: 40px; height: 40px; object-fit: cover; border: 1px solid var(--border-color); padding: 1px; background: #fff; vertical-align: top; }

.badge {
    display: inline-block; background-color: var(--orkut-pink); color: white;
    font-size: 9px; font-weight: bold; min-width: 16px; height: 16px;
    line-height: 16px; text-align: center; border-radius: 8px;
    padding: 0 3px; vertical-align: middle; margin-left: 3px;
}

.community-card { display: flex; gap: 8px; align-items: center; padding: 8px 5px; border-bottom: 1px dotted var(--border-light); font-size: 11px; }
.community-card:hover { background: var(--orkut-row-alt); }
.community-card img { width: 45px; height: 45px; object-fit: cover; border: 1px solid var(--border-color); padding: 1px; background: #fff; flex-shrink: 0; }

.alert-success { background-color: #d4edda; border: 1px solid #c3e6cb; color: #155724; padding: 10px 15px; font-size: 12px; margin-bottom: 15px; }
.alert-error { background-color: #f8d7da; border: 1px solid #f5c6cb; color: #721c24; padding: 10px 15px; font-size: 12px; margin-bottom: 15px; }
.alert-warning { background-color: #FFF9C4; border: 1px solid #FFD700; color: #856404; padding: 10px 15px; font-size: 12px; margin-bottom: 15px; }

.mobile-ad-container {
    display: none;
    margin-top: 10px;
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .mobile-ad-container { display: block !important; }
    .container { width: 100% !important; padding: 0 8px !important; }
    .nav-first-row { flex-direction: column !important; gap: 10px !important; text-align: center !important; padding: 12px 0 !important; }
    .nav-first-row div:first-child { transform: scale(0.8); }
    .nav-first-row div:last-child { justify-content: center !important; flex-direction: column !important; gap: 8px !important; width: 100% !important; }
    .nav-second-row .container { display: block !important; overflow-x: auto; white-space: nowrap; padding: 6px 5px !important; text-align: center; }
    .nav-second-row a { float: none !important; display: inline-block !important; margin: 0 6px !important; font-size: 11px !important; }
    .main-container { flex-direction: column !important; margin-top: 0 !important; gap: 0 !important; }
    .sidebar { width: 100% !important; margin-bottom: 5px !important; }
    .sidebar-compact { display: none !important; }
    .sidebar-menu-card, .sidebar-ad-card { display: none !important; }
    .right-sidebar { width: 100% !important; margin-top: 10px !important; }
    .profile-photo { max-width: 220px !important; width: 70% !important; margin: 0 auto !important; }
    .metadata-table td { font-size: 12px !important; }
    .metadata-table td:first-child { min-width: 85px; padding: 5px !important; }
    .ratings-container { flex-direction: column !important; padding: 10px !important; align-items: stretch !important; gap: 0 !important; }
    .ratings-row { display: flex !important; flex-direction: row !important; justify-content: space-around !important; width: 100% !important; gap: 0 !important; margin-bottom: 15px !important; }
    .meter { flex: 1 !important; }
    .meter-label { font-size: 10px !important; margin-bottom: 4px !important; }
    .meter-icon { font-size: 17px !important; }
    .fans-section { border-left: none !important; border-top: 1px dotted #99B2E5 !important; padding: 10px 0 !important; width: 100% !important; margin: 0 !important; display: flex; justify-content: center; align-items: center; gap: 10px; }
    .fans-title { margin: 0 !important; }
    .fans-count { font-size: 18px !important; }
    .index-container { flex-direction: column !important; align-items: center !important; gap: 15px !important; margin-top: 15px !important; padding: 0 10px; }
    .index-container > div { width: 100% !important; flex: none !important; min-width: 0 !important; }
    .auth-box { width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; }
    .index-hero-title { text-align: center; font-size: 17px !important; }
    .index-hero-box { margin-bottom: 12px !important; }
    .stories-container { gap: 8px; }
    .story-item { width: 55px; }
    .story-avatar-ring { width: 48px; height: 48px; }
}
