@import url('https://fonts.googleapis.com/css2?family=Work+Sans&display=swap');

* {
    padding: 0;
    margin: 0;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

:root {
    --black: #000;
    --white: #fff;
    --color-primary: #4452fe;
    --color-dark-primary: #333fc3;
    --yellow: #FDB813; /* Yellow color for light mode button */
}

html, body {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Work Sans', sans-serif;
    background-color: var(--black);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.content-container {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* header */
header {
    padding: 1em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-container {
    background-color: white;
    width: 5em;
    height: 5em;
    outline: 1px solid var(--black);
    border-radius: 50%;
    overflow: hidden;
    transition: all 0.4s;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
}

.social-container img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    transition: opacity 0.3s;
}

.social-links {
    display: none;
    gap: 1em;
    position: absolute;
    left: 50%;
    transform: translate(-50%);
    width: 80%;
    justify-content: space-around;
    transition: opacity 0.4s ease;
    opacity: 0;
}

.social-links a {
    color: black;
    font-size: 1.5em;
    transition: 0.3s;
}

.social-links a:hover {
    transform: scale(1.2);
}

.social-container.expanded {
    width: 15em;
    border-radius: 2.5em;
}

.expanded img {
    opacity: 0;
}

.expanded .social-links {
    display: flex;
    opacity: 1;
}
/* end header */

.wrapper {
    width: 85vmin;
    padding: 3.135em 2.5em;
    background-color: var(--white);
    position: absolute;
    transform: translate(-50%, -50%);
    top: 50%;
    left: 50%;
    border-radius: 5px;
    box-shadow: 20px 20px 40px rgba(97, 63, 0, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1em;
}

.wrapper p {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 8px;
}

.wrapper input {
    width: 100%;
    height: 45px;
    padding: 1em;
    border: 1px solid var(--black);
    border-radius: 5px;
    outline: 1px solid var(--black);
    transition: all 0.1s ease;
}

.wrapper input:focus {
    outline: none;
    border: 2px solid var(--color-primary);
}

.wrapper input::placeholder {
    font-family: 'Work Sans', sans-serif;
    margin-left: 0.5em;
}

.wrapper button {
    font-family: 'Work Sans', sans-serif;
    background: var(--color-primary);
    color: var(--white);
    width: 80%;
    height: 45px;
    padding-left: 1em;
    padding-right: 1em;
    border: none;
    outline: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.5s ease;
}

.wrapper button:hover {
    background: var(--color-dark-primary);
}

#imgBox {
    width: 200px;
    border-radius: 5px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease-in;
}

#imgBox img {
    width: 90%;
    padding: 10px;
}

#imgBox.show-img {
    max-height: 300px;
    margin: 1em;
    margin-left: 2em;
}

.error {
    animation: shake 0.1s linear 10;
}

@keyframes shake {
    0% {
        transform: translate(0);
    }

    25% {
        transform: translate(-2px);
    }

    50% {
        transform: translate(0);
    }

    75% {
        transform: translate(2px);
    }

    100% {
        transform: translate(0);
    }
}

footer {
    color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1em;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
}

footer p {
    font-size: 0.9em;
    color: #f3f3f3;
}

footer a {
    font-size: 0.9em;
    color: var(--white);
    text-decoration: none;
    transform: 0.3s ease;
}

footer a:hover {
    text-decoration: underline var(--color-primary);
}

/* Dark Mode */
body {
    background-color: var(--black);
}

footer p {
    color: var(--white);
}

/* Light Mode Button */
.theme-toggle-btn {
    background-color: var(--color-primary);
    color: var(--black);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.theme-toggle-btn i {
    font-size: 1.5em;
}

/* Light Mode */
body[data-theme='light'] {
    background-color: var(--white);
}

body[data-theme='light'] footer p {
    color: var(--black);
}

body[data-theme='light'] footer a {
    color: var(--black);
}

/* Light Mode Button */
body[data-theme='light'] .theme-toggle-btn {
    background-color: var(--yellow);
    color: var(--black);
}

/* Icon change for light mode */
body[data-theme='light'] .theme-toggle-btn i {
    content: '\f185'; /* Sun icon */
}
