/**BASE PAGE**/
#base-panel {
	position: relative;
	z-index: 5; /* must be higher than .img-up and other buttons, but lower than #panel-back */
	max-width: 1060px;
	margin: 0 auto 20px;
	border: 1px solid #ccc;
	border-top: none;
	border-radius: 0 0 3px 3px;
	background: #fff;
}
.darkmode #base-panel {
	border: none;
	background: none;
	margin-top: 20px;
}
.base-options {
	margin: 0 auto;
	line-height: 30px;
	padding: 10px;
}
.darkmode .base-options {
	padding: 0;
}
.base-stream-select {
	float: left;
	margin-right: 10px;
}
.base-hot, .base-latest {
	position: relative;
	display: inline-block;
	vertical-align: top;
	color: #555;
	height: 28px;
	line-height: 28px;
	border: 1px solid #ccc;
}
.darkmode .base-hot,
.darkmode .base-latest {
	color: #ccc;
	border-color: #666;
	background: #333;
}
.base-hot:hover, .base-latest:hover {
	color: #fff;
	text-decoration: none;
}
.base-hot.on, .base-latest.on {
	color: #fff;
}
.base-hot {
	padding: 0 10px 0 9px;
	border-right: none;
	border-radius: 3px 0 0 3px;
}
.base-latest {
	padding: 0 9px 0 10px;
	border-left: none;
	border-radius: 0;
}
.base-hot.on, .base-hot:hover {
	border-color: #f70;
	background: #f70;
}
.base-latest.on, .base-latest:hover {
	border-color: #00bff3;
	background: #00bff3;
	padding: 0 10px;
	border-right: none;
}
.base-sort {
	float: left;
	margin-right: 10px;
	user-select: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
}
.base-sort .i-select-wrap {
	vertical-align: top;
}
.base-latest + .i-select-wrap .i-select-btn {
	border-radius: 0 3px 3px 0;
	padding: 0 14px;
	border-left: none;
}
.sort-hot, .sort-latest, .sort-top {
	position: relative;
}
.sort-hot:before,
.sort-latest:before,
.sort-top:before {
	content: '';
	position: absolute;
	left: 3px;
	top: 50%;
	height: 24px;
	margin-top: -12px;
	width: 2px;
	border-radius: 2px;
}
.sort-hot:before {
	background: #f70;
}
a.sort-hot:hover {
	color: #f70;
}
.sort-latest:before {
	background: #00bff3;
}
a.sort-latest:hover {
	color: #00bff3;
}
.sort-top:before {
	background: #4b4;
}
a.sort-top:hover {
	color: #4b4;
}
#base-panel #safe-button {
	font-size: 12px;
	vertical-align: top;
}
.base-toggle-more {
	display: none;
	float: right;
	margin-left: 10px;
	width: 32px;
	height: 30px;
	padding: 0;
}
.base-toggle-more:after {
	right: 10px;
	border-top-color: #999;
}
#base-right {
	float: right;
	width: 300px;
	max-width: 100%;
}
#base-right h2 {
	margin-top: 0;
}
#base-right .ibox {
	margin: 0 0 20px;
}
.base-ad-top {
	margin: 20px -14px 0;
}
.base-ad-side {
	float: right;
	max-width: 300px;
	max-height: 600px;
	overflow: hidden;
	position: sticky;
	top: 74px; /* 20px below sticky header panel */
}
.base-ad-side:empty {
	display: none;
}
.base-top-meme {
	padding: 5px;
	margin: 0 -5px;
	display: block;
	border-radius: 3px;
}
.base-top-meme:hover {
	background: #eee;
	text-decoration: none;
}
.darkmode .base-top-meme:hover {
	background: #222;
}
.base-top-meme table {
	border-spacing: 0;
}
.base-top-meme td {
	padding: 0;
}
.base-top-meme-img {
	width: 50px;
	height: 50px;
	margin-right: 20px;
	vertical-align: middle;
}
.base-top-meme-label {
	color: #333;
}
.darkmode .base-top-meme-label {
	color: #ccc;
}
.base-all-memes-link {
	margin-top: 10px;
	width: 100%;
}
#leaderboard {
	width: 100%;
	box-sizing: border-box;
	-moz-box-sizing: border-box;
	-webkit-box-sizing: border-box;
}
#leaders a.row {
	width: 94%;
	padding: 10px 3%;
	color: #333;
	font-size: 13px;
}
.darkmode #leaders a.row {
	color: #ccc;
}
#leaders {
	margin: 10px 0;
}
#leaders .u-username {
	margin-right: 50px; /* assumes user's weekly points are 999,999 or less */
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
#leaderboard p {
	text-align: center;
}
#leaderboard p a {
	color: #888;
}
#base-pro {

}
#base-pro h2 {
	margin: 0;
}
#base-pro ul {
	margin: 20px 0;
	padding: 0 0 0 20px;
}
.base-pro-btn {
	display: block;
	margin-top: 20px;
}
#base-left {
	float: left;
	width: 740px;
	max-width: 100%;
	padding: 19px;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 3px;
	position: relative;
	box-sizing: border-box;
	-moz-box-sizing: border-box;
	-webkit-box-sizing: border-box;
}
.darkmode #base-left {
	background: #333;
	border-color: #666;
}
.base-unit {
	width: 100%;
	padding-bottom: 20px;
	border-bottom: 1px solid #ccc;
	margin-bottom: 20px;
}
.darkmode .base-unit {
	border-color: #666;
}
.base-title {
	padding: 0;
	margin: 20px 10px;
	font-size: 22px;
	max-width: 100%;
	word-wrap: break-word;
}
.base-title a {
	color: #666;
}
.darkmode .base-title a {
	color: #aaa;
}
.base-flag {
	float: right;
	font-size: 9px;
	color: #f44;
}
.base-img-wrap-wrap {
	float: left;
	width: 440px; /* keep in sync with get_images_html $max_width */
	min-height: 170px; /* otherwise vote button may float awkwardly over to the left */
	position: relative;
}
.base-img-has-more {
	max-height: 800px; /* a bit smaller than SUPER_LONG_IMG_HEIGHT to ensure we don't show a button when nothing is actually hidden */
	overflow: hidden;
}
.base-img-showing-more {
	max-height: none;
	padding-bottom: 50px;
}
.base-img-more-btn {
	width: 100%;
	position: absolute;
	bottom: 0;
	left: 0;
	height: 50px;
	line-height: 50px;
	text-align: center;
	font-size: 24px;
	color: #fff;
	background: #00bff3;
	opacity: 0.9;
	cursor: pointer;
}
.base-img-more-btn:hover {
	opacity: 1;
}
.base-img-wrap {
	margin: 0 auto;
	max-width: 100%;
}
.base-img-link {
	display: block;
	position: relative;
	height: 0;
}
.base-img {
	display: block;
	margin: 0 auto;
	max-width: 100%;
}
.base-img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}
.base-nsfw-msg {
	color: #fff;
	text-align: center;
	padding: 50px 20px;
	background: #ccc;
	border-radius: 3px;
}
.darkmode .base-nsfw-msg {
	background: #777;
	color: #ccc;
}
.base-unit-title, .base-info {
	width: 240px;
	float: right;
}
.base-unit-title {
	margin: 0 0 10px;
	word-wrap: break-word;
}
.base-unit-title a {
	color: #333;
}
.darkmode .base-unit-title a {
	color: #ccc;
}
.base-unit-title a:hover {
	color: #00bff3;
	text-decoration: none;
}
.base-author {
	font-size: .7em;
	color: #888;
	margin: 0 0 10px;
}
.base-author a {
	color: #444;
}
.darkmode .base-author a {
	color: #ccc;
}
.base-view-count, .base-com-count {
	font-size: 11px;
	line-height: 14px;
	color: #888;
	margin: 3px 0 0;
}
.base-vote {
	margin: 10px 0 0;
}
.base-vote .-down {
	margin-right: 0;
}
.base-vote .img-down + .img-audio-toggle {
	margin-left: 3px;
}

/*** Create buttons! ***/
.base-create-btn {
	display: block;
	height: 30px;
	line-height: 30px;
	color: #222;
	text-indent: 15px;
	padding: 5px;
	margin: -5px;
	border-radius: 3px;
}
.darkmode .base-create-btn {
	color: #ccc;
}
.base-create-btn:hover {
	background: #eee;
	text-decoration: none;
}
.darkmode .base-create-btn:hover {
	background: #222;
}
.base-create-btn + .base-create-btn {
	margin-top: 5px;
}

/*** Streams ***/
.stream-description {
	margin: 20px 10px;
	word-wrap: break-word;
}
.stream-settings-btn {
	float: right;
	margin: 0 0 20px 20px;
}
.stream-settings-btn .gear-icon {
	width: 20px;
	height: 20px;
	margin: 5px 5px 5px -4px;
	float: left;
}
.stream-follow-btn, .stream-unfollow-btn {
	margin-bottom: 20px;
}
.stream-follow-btn.hidden, .stream-unfollow-btn.hidden {
	display: none;
}
.stream-title {
	margin-bottom: 20px;
	line-height: 17px;
	word-wrap: break-word;
}
.stream-follow-count {
	float: right;
	margin-left: 15px;
	font-size: 12px;
	line-height: 17px;
}
.stream-mods-title {
	margin: 30px 0 10px;
}
.stream-mods {
	margin: 0 -5px 20px;
}
a.stream-mod {
	display: block;
	padding: 10px 5px;
	font-size: 13px;
	color: #333;
	border-radius: 3px;
}
.stream-mod-owner {
	color: #4b4;
	font-size: 10px;
	margin-left: 5px;
}
a.stream-mod:hover {
	text-decoration: none;
	background: #eee;
}
.darkmode .stream-mod {
	color: #ccc;
}
.darkmode .stream-mod:hover {
	background: #222;
}
.stream-mod.default-hidden {
	display: none;
}
.show-all .stream-mod.default-hidden {
	display: block;
}
.stream-mods-toggle-more {
	margin: 10px 0 10px 5px;
}
.stream-follow-count + .base-create-wrap {
	margin-top: 20px;
}
.base-create-wrap + .stream-create-btn {
	margin-top: 20px;
}
.stream-claim-msg {
	margin: 20px 0;
}


@media (max-width: 1100px) {
	.base-title,
	.stream-description {
		width: 720px;
		max-width: 100%;
		margin: 20px auto;
	}
	#base-left {
		float: none;
		margin: 0 auto;
	}
	#base-right {
		float: none;
		width: 740px;
		margin: 0 auto 20px;
		max-width: 100%;
	}
	.base-toggle-more {
		display: inline-block;
	}
	#leaderboard,
	.base-create,
	#base-top-memes,
	#base-pro {
		display: none;
	}
	#base-panel {
		max-width: 740px;
	}
}

@media (max-width: 800px) {
	#base-panel {
		max-width: none;
		border-radius: 0;
		border-left: none;
		border-right: none;
		margin-left: -3px;
		margin-right: -3px;
	}
	.darkmode #base-panel {
		padding: 0 10px;
	}
}

@media (max-width: 768px) {
	.base-title,
	.stream-description {
		display: block;
		width: auto;
		margin: 20px 10px;
	}
	.base-img-wrap-wrap {
		width: 100%;
		max-width: 100%;
	}
	.base-unit-title, .base-info {
		width: 100%;
		max-width: 100%;
	}
	.base-author {
		margin: 5px 0;
	}
}

@media (max-width: 550px) {

	/***Home***/
	.base-stream-select .i-select-btn {
		max-width: 135px;
		overflow: hidden;
	}
	.base-stream-select .i-select-btn:before {
		position: absolute;
		content: '';
		right: 0;
		top: 0;
		height: 100%;
		width: 26px;
		background: #fff;
		background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,1) 30%, #fff);
	}
	.darkmode .base-stream-select .i-select-btn:before {
		background: #333;
		background: linear-gradient(to right, rgba(51,51,51,0), rgba(51,51,51,1) 30%, #333);
	}
	#base-panel #safe-button {
		font-size: 10px;
	}
	.base-title {
		font-size: 18px;
	}
	#base-left {
		padding: 5px;
		width: auto;
	}
	.base-vote {
		margin: 5px 0 0;
	}
	.base-ad-top {
		margin-left: auto;
		margin-right: auto;
	}

}

@media (max-width: 400px) {
	.base-stream-select .i-select-btn {
		max-width: 100px;
	}
}