html {
    font-family: helvetica, arial, sans-serif;
}

body {
    margin: 0;
    background: #222;
    color: #ddd;
    font-size: 16px;
    overflow-x: hidden;
}

#wrapper {
    min-height: 100vh;
    position: relative;
    display: flex;
    display: -webkit-flex;
    flex-direction: column;
    align-content: stretch;
    min-width: 320px;
}

#wrapper > header {
    padding: 8px;
    box-shadow: 0 2px 5px #000;
    background: #444;
}

#wrapper > header > .wrapper {
    display: flex;
    display: -webkit-flex;
    justify-content: space-between;
    align-items: center;
    height: 30px;
}

#wrapper > article {
    flex: 1;
    -webkit-flex: 1;
    padding: 8px;
    flex-direction: column;
    -webkit-flex-direction: column;
}

header > .wrapper > #common-header > a > h1 {
    text-indent: -3000%;
    background: url('/content/images/logo.svg') no-repeat center left;
    width: 130px;
    height: auto;
    margin: -8px 2em -8px 0;
    position: relative;
    display: inline-block;
}

footer {
    background: #444;
    color: #fff;
    width: 100%;
    margin: 0;
    padding: 8px;
    box-sizing: border-box;
    box-shadow: 0 2px 10px #000;
}

label {
    display: block;
}

a {
    color: #74dc81;
}


form label span {
    display: block;
    margin-bottom: 2px;
}

form label span:after {
    content:':';
}

a.social-login {
    text-indent: -3000%;
    overflow: hidden;
    white-space: nowrap;
    width: 35px;
    height: 35px;
    display: inline-block;
    background-repeat: no-repeat;
    border: 1px solid #777;
    border-radius: 5px;
    margin: 5px 10px 5px 0;
    background-size: 27px;
    background-position: center;
}

.social-login-google {
    background-image: url(images/google.svg);
}

.social-login-google:hover {
    background-color: #4285F4;
}

.social-login-reddit {
    background-image: url(images/reddit.svg);
}

.social-login-reddit:hover {
    background-color: #e74a1e;
}

.social-login-facebook {
    background-image: url(images/facebook.svg);
}

.social-login-facebook:hover {
    background-color: #3b5998;
}

input[type="text"], input[type="password"], input[type="email"] {
    background: #444;
    color: #fff;
    border: 1px solid #888;
    padding: 5px;
    border-radius: 2px;
    font-size: 18px;
    width: 11em;
}

input[type="submit"] {
    padding: 5px 1em;
    border: 1px solid #ccc;
    background: #888;
    border-radius: 2px;
    font-size: 18px;
    color: #fff;
    text-shadow: 1px 0px 2px #000;
}

#my-details form input[type="submit"] {
    vertical-align: middle;
    width: 5em;
    padding: 5px;
}

#my-details form label {
    margin: 1ex 0;
}

#my-details form label span {
    display: inline-block;
    width: 17ex;
}

section#my-albums {
    flex: 1;
    margin-right: 2em;
}

form#update-details-form, form#change-password-form,div#my-credits {
    border-bottom: 1px solid #888;
    padding-bottom: 15px;
}

#my-details h4 {
    margin: 14px 0;
    font-size: 16px;
}

#albumsList>li>a {
    display: block;
    position: absolute;
    height: 100%;
    width: 100%;
    color: #ddd;
    text-decoration: none;
}

#albumsList{
    padding: 0;
    display: flex;
    display: -webkit-flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

#albumsList>li .delete {
    cursor: pointer;
    float: right;
    color: #e64c4c;
    z-index: 1000;
}

#albumsList>li:hover .delete:hover {
    text-decoration: underline;
}

#albumsList>li {
    list-style: none;
    position: relative;
    border: 1px solid #888;
    width: 240px;
    height: 150px;
    margin: 10px 0;
    width: 100%;
    height: 0;
    padding-bottom: 70%;
}

#albumsList>li>a>header {
    background: rgba(0,0,0,0.7);
    padding: 4px;
    display: flex;
    display: -webkit-flex;
    flex-direction: row;
    -webkit-flex-direction: row;
}

#albumsList>li span.title {
    flex: 1;
    -webkit-flex: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}


#albumsList>li>a>.content>img {
    max-width: 240px;
    max-height: 100px;
    position: absolute;
    box-shadow: 1px 1px 7px #000;
}


#albumsList>li>a>.content {
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

div#no-user-header {justify-content: space-between;}

a#upload_link {
    color: #ff7;
    padding: 5px 10px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    text-shadow: 0 0 3px rgba(0,0,0,0.4);
    background: linear-gradient(to bottom, #aaffb2 0%,#6ada79 50%,#56ce68 51%,#2ba545 100%);
    box-shadow: 0 1px 4px #000;
    white-space: nowrap;
}

em.user-credits {
    font-style: normal;
    font-size: 125%;
    background: #daa62c;
    color: #ffeb67;
    border-radius: 50px;
    font-weight: bold;
    display: inline-block;
    padding: 0.4ex 0.6ex;
    box-shadow: 0 1px 5px #000;
    background: radial-gradient(ellipse at center, #ffc966 0%,#bd8c00 100%);
    text-shadow: 0 1px 3px black;
    min-width: 2ex;
    text-align: center;
}

form#paypal-form {
}

div#buy-credits-content {
}

div#buy-credits-content>span {
    display: inline-block;
    width: 17ex;
    vertical-align: top;
}

div#buy-credits-content>form{
    display: inline-block;
    vertical-align: top;
}

footer>.wrapper>span, footer>.wrapper>div>a {
    margin-right: 1em;
    display: inline-block;
}

footer>.wrapper>div {
    display: inline-block;
}

#tos section, #privacy section {
    margin-bottom: 1em;
    background: #333;
    padding: 1ex 3ex;
    box-shadow: 0 2px 8px black;
}

article.error {
    display: flex;
    display: -webkit-flex;
    justify-content: center;
    align-items: center;
}

article.error h2 {
    display: inline-block;
    font-size: 70px;
    margin: 0;
}

article.error > .wrapper {
    width: auto;
    min-width: 300px;
    text-shadow: 0 2px 5px black;
}

article.error h3 {
    font-size: 40px;
    margin: 0;
    color: #777;
}

#transfer-credits-to-my-paypal {
    border-top: 5px solid #555;
    padding: 1ex;
    margin: 1ex 1ex 0 1ex;
    background: #333;
    max-width: 38ex;
}

.result-message {
    color: #FFF;
    padding: 5px;
    text-align: center;
    vertical-align: middle;
    box-sizing: content-box;
    display: inline-block;
    width: 16em;
    margin-left: 1em;
    text-shadow:  1px 1px 1px #000;
    transition: opacity 0.5s;
    opacity: 1;
}

.result-message.hidden {
    opacity: 0;
}

.result-message.success {
    background: #090;
}

.result-message.error {
    background: #900;
}

header > .wrapper > #common-header > a > h1:after {
    content: "Alpha";
    font-size: 40%;
    font-family: arial, sans-serif;
    background: #b00;
    padding: 2px 6px;
    text-shadow: 0 0 3px #000;
    border-radius: 3px;
    transform: rotate(-20deg);
    display: block;
    box-shadow: 2px 1px 6px #000;
    position: absolute;
    left: 110px;
    top: 26px;
    text-indent: 0;
    color: #fff;
}

#common-header {
    display: flex;
    display: -webkit-flex;
    justify-content: space-between;
    align-items: center;
}

#user-header {
    display: flex;
    display: -webkit-flex;
    justify-content: space-between;
    align-items: center;
}

#greeting {
    position: relative;
    margin-right: 20px;
}

#greeting>#user-menu-toggle:hover {
    background: #777;
}

#greeting>#user-menu-toggle {
    display: inline-block;
    margin-left: 10px;
    padding: 5px;
    border-radius: 20px;
    height: 10px;
    width: 10px;
    top: 5px;
    position: relative;
}

#greeting>#user-menu-toggle:hover:after {
    border-top-color: #ddd;
}

#greeting.open>#user-menu-toggle:hover:after {
    border-bottom-color: #ddd;
}

#greeting>#user-menu-toggle:after {
    content: "";
    top: -1px;
    position: relative;
    display: inline-block;
    width: 0;
    height: 0;
    border: 5px solid transparent;
    border-top-color: #999;
}

#greeting.open>#user-menu-toggle:after {
    border-bottom-color: #999;
    border-top-color: rgba(0, 0, 0, 0);
    top: -8px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

#greeting.open ul#user-menu {
    visibility: visible;
    opacity: 1;
}

#greeting ul#user-menu {
    visibility: hidden;
    position: absolute;
    left: 0;
    right: 0px;
    top: 35px;
    margin: 0 -15px -15px -15px;
    padding: 0 10px 10px 10px;
    list-style: none;
    background: #444;
    z-index: 10000;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 2px 5px 0px black;
    clip: rect(0px,1000px, 1000px,-10px);
    opacity: 0;
    transition: opacity 0.4s, visibility 0.4s;
}

#user-menu li {
    margin: 5px 0;
    padding: 0;
}

#user-menu li#user-menu-item {
    display: none;
    border-bottom: 1px solid #888;
    background: #666;
    margin: 0 -10px;
    padding: 5px 10px;
}

#user-menu li#credits-menu-item {
    display: none;
    padding: 10px 10px;
    border-bottom: 1px solid #888;
    margin: 0 -10px;
}

#user-menu li.highlight a{
    text-decoration: none;
    color: #ddd;
}

#user-menu li.highlight a{
    display: block;
    padding: 5px;
}

#user-menu li#logout-menu-item {
    margin-bottom: 0;
}

#user-menu li.highlight:hover {
    background: #666;
    border-radius: 3px;
    margin: 5px -1px;
    padding: 0 1px;
}

@media (min-width: 376px) {
    #common-header:after {
        content: "";
    }
}

@media (max-width: 700px) {
    #user-header {
        font-size: 15px;
        flex-direction: column;
        align-items: flex-end;
    }
    em.user-credits {font-size: 17px;}
    #credits { order: 2; }
    #greeting { order: 1; }
}

@media (max-width: 550px) {
    header > .wrapper > #common-header > a > h1 {
        height: 23px;
        width: 90px;
        margin: 0 1em 0 0;
    }

    header > .wrapper > #common-header > a > h1:after {
        font-size: 9px;
        left: 80px;
        top: 14px;
        padding: 1px 3px;
    }

    article.error h2 { font-size: 9vw; }
    article.error h3 { font-size: 7vw; }

    section#my-albums {
        margin-right: 0;
    }
    #albumsList>li {
        width: 48%;
        padding-bottom: 34%;
    }
}

@media (max-width: 425px) {
    #upload_link {
        font-size: 14px;
    }
    #user-header {
        font-size: 13px;
        flex-direction: column;
    }
    footer {
        font-size: 13px;
    }
    em.user-credits {
        font-size: 15px;
    }
    #albumsList>li {
        width: 95vw;
        height: 60vw;
    }
}

@media (max-width: 800px) {
    .wrapper {
        width: 100%;
        margin: 0;
    }
    #wrapper > header > .wrapper {
        /* height: 40px; */
    }
    #user-header {
        /* flex-direction: column; */
        /* align-items: flex-end; */
        flex: 0.3;
        -webkit-flex: 0.3;
    }
    #user-header:before {
        content: "";
    }
    #common-header {
        flex: 1;
        -webkit-flex: 1;
    }

    #credits {
        /* order: 1; */
        display: none;
    }
    #greeting {
        /* order: 0; */
        margin-right: 0;
    }
    #greeting > a {
        display: none;
    }

    #user-menu li#user-menu-item, #user-menu li#credits-menu-item {
        display: block;
    }

    #greeting > #user-menu-toggle {
        width: auto;
        height: auto;
        padding: 0;
        display: flex;
        align-items: center;
        top: 0;
    }
    #greeting > #user-menu-toggle:hover {
        background: none;
    }
    #greeting > #user-menu-toggle:after {
        content: '\2261';
        top:auto;
        border: none;
        vertical-align: middle;
        width: auto;
        height: auto;
        font-size: 36px;
        margin: -10px;
        padding: 10px;
        transition: background 0.4s;
    }
    #greeting.open > #user-menu-toggle:after {
        top:auto;
        background: #666;
    }
    #greeting.open ul#user-menu {
        transform: translate3d(0,0,0);
    }
    #greeting ul#user-menu {
        position: fixed;
        right: 15px;
        left: auto;
        top: 46px;
        bottom: 0;
        border-radius: 0;
        width: 12em;
        transition: transform 0.4s, visibility 0.4s;
        transform: translate3d(14em,0,0);
        opacity: 1;
        z-index: 10000;
        font-size: 20px;
    }
    .user-page #albumsList>li {
        max-width: 48%;
        padding-bottom: 33vw;
    }
}
/*
@media (max-width: 375px) {
    #common-header  {
        flex-direction: column;
        align-items: flex-start;
        height: 60px;
    }
    #user-header {
        height: 60px;
    }
    #user-header.no-user {
        align-items:flex-start;
    }

    .user-page #albumsList>li {
        padding-bottom: 120px;
    }
}
*/
@media (max-width: 450px) {
    #albumsList>li {
        width: 95%;
        height: 0;
        padding-bottom: 62%;
    }
}
@media (min-width: 801px) {
    #albumsList>li {
        max-width: 48%;
        padding-bottom: 16vw;
        /* width: 24%; */
    }
    .user-page #albumsList>li {
        padding-bottom: 33vw;
    }
}
@media (min-width: 701px) {
    #user-header.logged-in:before {
        content: "";
    }
    #user-header.logged-in{
        flex: 1;
        -webkit-flex: 1;
    }
}

@media (min-width: 801px) {
    #common-header{
        flex: 1;
        -webkit-flex: 1;
    }

    .wrapper {
        width: 100%;
    }
}

@media (min-width: 901px) {
    .wrapper {
        width: 900px;
        margin: auto;
    }
    #albumsList>li {
        padding-bottom: 150px;
    }

    .user-page #albumsList>li {
        padding-bottom: 300px;
    }
}

form label {
    margin: 1em 0;
}

label > input[type=checkbox] {display: none;-webkit-appearance: none;}

label > input[type=checkbox] + span {
    vertical-align: middle;
}

label > input[type=checkbox] + span:before {
    content: "";
    display: inline-block;
    width: 1em;
    height: 1em;
    border: none;
    background: rgba(0,0,0,0.3);
    box-shadow: 1px 1px 3px #000 inset;
    margin: -0.1em 1ex 0 0;
    vertical-align: middle;
    text-align: center;
    color: #0b0;
    text-shadow: 0 0 3px #000;
    text-indent: 0.2ex;
}

label > input[type=checkbox]:checked + span:before {
    content: "\2714";
}
