Picture-Puzzle-website/static/css/main.css

568 lines
9.4 KiB
CSS

/* Animated underline */
nav a.link:hover, .topics:hover {
color: #fff;
}
nav a.link:hover::before, footer ul li a:hover::before, .topics:hover::before {
transform: scaleX(1);
}
/* Global */
html {
font-family: 'JetBrains Mono', monospace;
background: #1F1F1F;
}
body {
background-color: #f8f9fa;
margin: 0;
padding: 0;
box-sizing: border-box;
margin: 0 auto;
background: #1F1F1F;
color: #fff;
}
h1 {
font-weight: bold;
color: #0889E5;
margin: 1rem 0;
}
a {
color: #0889E5;
}
hr {
border: none;
border-top: 1px solid #B6C7D3;
}
/* Navbar */
nav {
background: #1a1b1e;
display: flex;
align-items: center;
justify-content: space-between;
padding: 1rem 2rem;
color: #fff;
}
nav img {
margin: 0;
}
nav li a, nav a.link {
text-decoration: none;
padding: 0.6rem 0.25rem;
position: relative;
color: #fff;
}
nav a.link::before {
content: "";
position: absolute;
display: block;
width: 80%;
height: 2px;
bottom: -2px;
left: 10%;
transform: translateX(-50%);
background-color: #fff;
transform-origin: center;
transform: scaleX(0);
transition: transform 0.3s ease;
}
nav ul {
display: flex;
list-style: none;
margin: 0;
padding: 0;
align-items: flex-end;
justify-content: flex-end;
}
nav ul li {
margin-right: 1.5rem;
}
nav ul li:last-child {
margin-right: 0;
}
.dropdown.pull-left .dropdown-content {
right: 0;
left: auto;
}
nav ul li a {
color: #fff;
text-decoration: none;
font-size: 20px;
font-weight: bold;
}
nav .dropdown a::before {
display: none;
}
.dropdown {
position: relative;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
z-index: 1;
border: 1px solid #ccc;
padding: 10px;
margin-top: 10px;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
top: 100%;
}
.dropdown:hover .dropdown-content {
display: block;
}
.dropdown-content a {
color: #1F1F1F;
padding: 8px 12px;
text-decoration: none;
display: block;
}
.dropdown-content a:hover {
background-color: #B6C7D3;
}
.dropdown-content a::before {
display: none;
}
.simple-text {
width: 70%;
text-align: center;
font-size: 20px;
margin: 0 auto;
}
/* Content Section */
.content {
padding: 50px;
}
h2 {
font-style: italic;
}
/* Featured and latest posts */
.featured-posts-container,
.latest-posts-container {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.featured-post,
.latest-post {
padding: 20px 35px;
box-sizing: border-box;
margin-bottom: 20px;
text-align: center;
background-color: #2c2c2c;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.featured-post a,
.latest-post a {
display: flex;
flex-direction: column;
align-items: center;
text-decoration: none;
color: inherit;
position: relative;
color: #fff;
font-size: 20px;
}
.featured-post img,
.latest-post img {
width: 500px;
height: 350px;
margin-bottom: 10px;
flex-shrink: 0;
border-radius: 6px;
}
.featured-post a::before,
.latest-post a::before {
content: "";
position: absolute;
bottom: -2px;
left: 50%;
transform: translateX(-50%);
width: 0;
height: 2px;
background-color: #fff;
transition: width 0.3s ease;
}
.featured-post a:hover::before,
.latest-post a:hover::before {
width: 100%;
}
.featured-posts h3,
.latest-posts h3 {
margin: 0.25rem;
font-size: 18px;
}
/* Footer */
footer {
background-color: #005DA5;
color: #fff;
padding: 20px;
text-align: center;
font-size: 14px;
margin-top: 20px;
}
footer ul {
list-style: none;
padding: 0;
margin: 0;
}
footer ul li {
display: inline-block;
margin-right: 10px;
}
footer ul li:last-child {
margin-right: 0;
}
footer ul li a {
color: #fff;
text-decoration: none;
position: relative;
}
footer ul li a:hover {
color: #fff;
}
footer ul li a::before {
content: "";
position: absolute;
display: block;
width: 100%;
height: 2px;
bottom: -2px;
left: 0;
background-color: #fff;
transform: scaleX(0);
transition: transform 0.3s ease;
}
/* Input Fields */
input[type="text"],
input[type="email"],
input#password, input#password-2, input#username,
textarea {
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
width: 20%;
margin-bottom: 10px;
box-sizing: border-box;
font-size: 16px;
transition: box-shadow 0.15s, transform 0.15s;
}
input[type="text"],
input[type="email"],
input#password, input#password-2, input#username,
textarea:hover {
box-shadow: rgba(45, 35, 66, 0.4) 0 4px 8px, rgba(45, 35, 66, 0.3) 0 7px 13px -3px, #D6D6E7 0 -3px 0 inset;
transform: translateY(-2px);
min-width: 250px;
}
/* Button */
button, input, .btn.btn-primary.mb-3 {
align-items: center;
appearance: none;
background-color: #FCFCFD;
border-radius: 4px;
border-width: 0;
box-shadow: rgba(45, 35, 66, 0.4) 0 2px 4px, rgba(45, 35, 66, 0.3) 0 7px 13px -3px, #D6D6E7 0 -3px 0 inset;
box-sizing: border-box;
color: #36395A;
cursor: pointer;
display: inline-flex;
font-family: "JetBrains Mono", monospace;
height: 40px;
justify-content: center;
line-height: 1;
list-style: none;
overflow: hidden;
padding-left: 16px;
padding-right: 16px;
position: relative;
text-align: left;
text-decoration: none;
transition: box-shadow 0.15s, transform 0.15s;
user-select: none;
-webkit-user-select: none;
touch-action: manipulation;
white-space: nowrap;
will-change: box-shadow, transform;
font-size: 18px;
}
button:focus, input:focus, .btn.btn-primary.mb-3:focus {
box-shadow: #D6D6E7 0 0 0 1.5px inset, rgba(45, 35, 66, 0.4) 0 2px 4px, rgba(45, 35, 66, 0.3) 0 7px 13px -3px, #D6D6E7 0 -3px 0 inset;
}
button:hover, input:hover, .btn.btn-primary.mb-3:hover {
box-shadow: rgba(45, 35, 66, 0.4) 0 4px 8px, rgba(45, 35, 66, 0.3) 0 7px 13px -3px, #D6D6E7 0 -3px 0 inset;
transform: translateY(-2px);
}
button:active, input:active, .btn.btn-primary.mb-3:active {
box-shadow: #D6D6E7 0 3px 7px inset;
transform: translateY(2px);
}
label {
margin-bottom: 8px;
display: inline-block;
}
.topics a {
color: #fff;
text-decoration: none;
font-size: 25px;
}
i.far.fa-comment {
font-size: 24px;
transform: translateY(-2px);
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
/* Posts page */
.posts {
max-width: 1400px;
margin: 0 auto;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
grid-gap: 20px;
}
.post {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
border: 1px solid #ccc;
padding: 20px;
border-radius: 10px;
transition: transform 0.3s ease;
}
.post:hover {
transform: scale(1.05);
}
.post img {
max-width: 100%;
height: auto;
border-radius: 10px;
}
.post a {
text-decoration: none;
color: #fff;
}
.post h2 {
margin-top: 20px;
}
/* Tooltip */
.gif-container {
position: relative;
display: inline-block;
}
.tooltiptext {
visibility: hidden;
width: 170px;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 5px;
padding: 5px 0;
position: absolute;
z-index: 1;
left: 30px;
margin-left: 12px;
opacity: 0;
transition: opacity 0.3s;
}
.gif-container:hover .tooltiptext {
visibility: visible;
opacity: 1;
}
.center {
text-align: center;
}
/* Forums */
.forum-card {
margin-bottom: 20px;
}
.forum-media {
max-width: 100%;
height: auto;
}
.forum-link:hover::before {
transform: scaleX(1);
}
.forum-link {
font-size: larger;
color: #fff;
text-decoration: none;
position: relative;
}
.forum-link::before {
content: "";
position: absolute;
display: block;
width: 100%;
height: 2px;
bottom: -2px;
left: 0;
background-color: #fff;
transform: scaleX(0);
transition: transform 0.3s ease;
}
.upvote-btn,
.downvote-btn {
cursor: pointer;
font-size: 1.2rem;
color: #6c757d;
}
.upvote-btn:hover,
.downvote-btn:hover {
color: #007bff;
}
.vote-count {
font-size: 1rem;
font-weight: bold;
}
.comment-section {
margin-top: 20px;
}
.comment {
margin-bottom: 10px;
}
.comment-media {
max-width: 100%;
height: auto;
}
.comment-text {
margin-bottom: 5px;
}
.comment-details {
font-size: 0.8rem;
color: #6c757d;
}
/* Mobile-specific */
@media only screen and (max-width: 767px) {
/* Navbar */
nav {
padding: 0.7rem 0.5rem;
}
nav li a, nav a.link {
padding: 0.1rem;
}
.dropdown-content {
padding: 5px;
}
nav ul li a {
font-size: 16px;
}
nav ul li {
margin-right: 0.4rem;
}
nav img {
max-width: 50px;
max-height: 50px;
}
nav ul {
margin-right: 0.5rem;
}
.logo {
min-width: 140px;
}
/* Content */
.content {
padding: 20px;
}
/* Posts */
.post {
padding: 15px;
}
/* Featured and latest posts */
.featured-post,
.latest-post {
padding: 20px;
}
.featured-post img,
.latest-post img {
width: 100%;
height: auto;
}
}