html {
    width: 100%;
    height: 100%;
    overflow: auto;
    margin: 0;
    padding: 0;
    font-family: sans-serif;
    color: #333;
    background-color: white;
}

body {
    margin: 0;
    padding: 0 0 4em;
}

button {
    font-size: 95%;
    font-weight: bold;
    color: #afe9af;
    background-color: #2ca02c;
    border: none;
    border-radius: 3px;
    margin: 1px 2px;
    padding: 0.15em 0.3em;
}
button:hover {
    color: white;
    background-color: #37c837;
    cursor: pointer;
}

header {
    text-align: center;
    padding: 0;
}
header img, header h1 {
    display: inline-block;
}
header img {
    height: 6em;
}
header h1 {
    font-size: 500%;
    margin: 0;
    vertical-align: text-bottom;
    color: #2ca02c;
}

#settings {
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: white;
    text-align: center;
    padding: 0.2 0;
    border-top: 1px solid #ccc;
}
#settings .line p {
    display: inline-block;
    margin: 0 1em;
}

.torrent {
    margin: 1em 0;
    padding: 1em 0.5em;
    border-top: dotted 1px #ccc;
}
.torrent h2 {
    font-size: 120%;
    font-weight: bold;
    margin: 0;
}
.torrent > .size {
    float: right;
    font-size: 90%;
    color: #777;
    margin: 0;
}
.torrent .remove {
    float: right;
}
.torrent .recover-container {
    margin: 0.1em 0;
    background-color: #ffc;
}
.torrent .stats {
    font-size: 90%;
    color: #777;
    margin: 0;
}

.torrent h3 {
    margin: 0.5em 0 0.2em;
    cursor: pointer;
    color: #2ca02c;
}
.torrent h3:hover, .torrent .collapsed h3:hover {
    color: black;
}
.torrent h3:before {
    content: '▼ ';
    font-family: monospace;
    font-size: 130%;
}
.torrent .collapsed {
    display: inline;
}
.torrent .collapsed h3 {
    display: inline;
    padding: 0 2em 0 0;
    color: #37c837;
}
.torrent .collapsed h3:before {
    content: '▶ ';
}

.torrent .files {
    list-style-type: none;
    margin: 0;
    padding: 0;
}
.torrent .files li {
    text-align: right;
}
.torrent .files li:hover {
    background-color: #f0f7f0;
}
.torrent .files h4, .torrent .files .size, .torrent .files button {
    display: inline-block;
    margin: 0;
}
.torrent .files h4 {
    float: left;
}
.torrent .files .size {
    color: #777;
    padding-right: 2em;
}
.torrent .files .save-container {
    list-style-type: none;
    padding: 0;
}
.torrent .video-container {
    display: block;
    width: 100%;
    background-color: black;
    padding: 0;
    margin: 4px 0 4px;
    text-align: center;
}
.torrent .video-container video,
.torrent .video-container webview {
    width: 100%;
}

.torrent .peers {
    border-spacing: 0;
    margin: 0 auto;
    display: block;
}
.torrent .peers thead tr {
    background-color: #333;
    color: white;
}
.torrent .peers th {
    text-align: left;
}
.torrent .peers th, .torrent .peers td {
    margin: 0;
    padding: 0.2em 0.5em;
}
.torrent .peers .state {
    font-family: monospace;
}
.torrent .peers .choking .queuestats .up,
.torrent .peers .choked .queuestats .down {
    color: #ccc;
}
.torrent .peers tbody tr:hover {
    background-color: #ddd;
}

.torrent .pieces-container {
    display: block;
}
.torrent .pieces-container .pieces-scroll {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    overflow-x: auto;
    background-color: #ccc;
}
.torrent .pieces-container .pieces-scroll canvas {
    display: inline;
    border: 1px solid #333;
}
.torrent .pieces-container p {
    text-align: center;
    font-size: 90%;
    color: #333;
    margin: 0;
}
.torrent .pieces-container .pieces-legend span {
    display: inline-block;
    width: 0.5em;
    height: 0.5em;
    line-height: 0.5em;
    vertical-align: baseline;
    border: 1px solid #333;
    margin: 0 0.1em 0 0.7em;
}
