/* Generic CSS */
body{
    margin: 0%;
    padding: 0%;
}
body{
    background-color: #0a0a0a;
    background: 
        radial-gradient(circle at 1px 1px, #1f1f1f 1px, transparent 0),
        #0a0a0a;
    min-height: 100vh;
    background-size: 20px 20px;
    width: auto;
}
header{
    background-color: #111111;
    width: 100%;
    height: auto;
}
.logo{
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: bolder;
    margin-left: 10px;

}
nav ul{
    list-style:none;
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: flex-end;
    padding-right: 1em;   
    /* border: yellow 2px solid;  */
}
nav ul li{
    margin: 5px;
}
a{
    text-decoration: none;
    color: rgb(69, 135, 69);
    transition: 0.3s;
    display: inline-block;
}
a:hover{
    text-decoration: underline;
    color: rgb(81, 228, 81);
    text-shadow: 0 0 8px rgb(81,228,81);
    transform: scale(1.1);
    border: 1px dashed wheat;
    border-radius: 20px;
    padding: 5px;
}

.active{
    color: rgb(187, 21, 33);
    text-decoration:underline rgb(69, 135, 69);
    text-underline-offset: 4px;

}
.active:hover{
    text-decoration: underline rgb(187, 21, 33);
    color: rgb(81, 228, 81);
    text-shadow: 0 0 8px rgb(81,228,81);
}
/* h2 & Message CSS */
.container h2 {
    color: white;
    font-size: 2rem;
    text-shadow: 0 0 10px rgba(81, 228, 81, 0.6);
    margin-bottom: 5px;
}
.container p {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    text-align: center;
    max-width: 300px;
    margin-bottom: 15px;
}

/* Contact Form Specific CSS */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}
.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px;
    border-radius: 20px;
    background: #111;
    box-shadow: 0 0 25px rgba(81, 228, 81, 0.2), inset 0 0 10px rgba(81, 228, 81, 0.15);
    border: 1px solid rgba(81, 228, 81, 0.2);
}

.contact-card::before {
    content: "";
    width: 60px;
    height: 3px;
    background: rgb(81, 228, 81);
    margin-bottom: 15px;
    border-radius: 10px;
}

#contact-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding: 30px;
    width: 320px;
    background: #111;
    border-radius: 20px;
    border: 1px solid rgba(81, 228, 81, 0.2);
    box-shadow: 0 0 20px rgba(81, 228, 81, 0.1);
    transition: 0.4s;
}
#contact-form:hover {
    box-shadow: 0 0 30px rgba(81, 228, 81, 0.3);
}
#contact-form input {
    background: #0a0a0a;
    border: 1px solid rgba(81, 228, 81, 0.2);
    border-radius: 10px;
    padding: 12px 10px;
    color: white;
    outline:none;
    transition: 0.3s;
}
#contact-form input:focus {
    border-color: rgb(81, 228, 81);
    box-shadow: 0 0 10px rgba(81, 228, 81, 0.5);
}


.input-group {
    position: relative;
    width: 100%;
}

.input-group input,
.input-group textarea {
    width: 100%;  
}

.input-group label {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
    pointer-events: none;
    transition: 0.3s;
    background: #111;
    padding: 0 5px;
}

.input-group input:focus + label,
.input-group input:valid + label,
input:not(:placeholder-shown) + label,
.input-group textarea:focus + label,
.input-group textarea:valid + label {
    top: -8px;
    left: 8px;
    font-family:cursive;
    font-size: 0.7rem;
    color: rgb(81, 228, 81);
}
.input-group input:invalid:not(:focus):not(:placeholder-shown)
{

    box-shadow: 0 0 5px red;
    animation: shake 50ms alternate 10;
}
@keyframes shake {
    from{
        transform: rotateZ(-1deg);
    }
    to{
        transform: rotateZ(1deg);
    }
}
.error {
    color:red;
    opacity: 0;
    transform: translateY(-5px);
    transition: 0.3s;
}

.input-group input:invalid:not(:focus):not(:placeholder-shown) ~ .error {
    opacity: 1;
    transform: translateY(0);
}

#contact-form input[type="submit"] {
    background: rgb(81, 228, 81);
    color: black;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}
#contact-form input[type="submit"]:hover {
    background: rgb(120, 255, 120);
    box-shadow: 0 0 15px rgba(81, 228, 81, 0.7);
}
#contact-form textarea {
    background: #0a0a0a;
    border: 1px solid rgba(81, 228, 81, 0.2);
    border-radius: 10px;
    padding: 10px;
    color: white;
    resize: none;
    height: 100px;
    transition: 0.4s;
}
#contact-form textarea:focus{
    border-color: rgb(81, 228, 81);
    box-shadow: 0 0 10px rgba(81, 228, 81, 0.5);
}
.copyright{
    color: white;
    text-align: end;
    justify-self: end;
    width: fit-content;
    border: white 1px solid;
    font-size: 0.8em;
}
