/* General body styling */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    overflow: auto;
    background: linear-gradient(315deg, rgba(0, 183, 255, 1) 0%, rgba(60, 132, 206, 1) 25%, rgba(0, 183, 255, 1) 50%, rgba(0, 205, 255, 1) 75%, rgba(0, 183, 255, 1) 100%);
    animation: gradient 15s ease infinite;
    background-size: 400% 400%;
    background-attachment: fixed;
    color: #ffffff;
    transition: background 0.3s, color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding-bottom: 6em; /* Space for the wave effect */
}

/* Animated gradient background */
@keyframes gradient {
    0% {
        background-position: 0% 0%;
    }
    50% {
        background-position: 100% 100%;
    }
    100% {
        background-position: 0% 0%;
    }
}

/* Waves styling */
.wave {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1000% 1000% 0 0;
    position: fixed;
    width: 200%;
    height: 12em;
    animation: wave 10s -3s linear infinite;
    transform: translate3d(0, 0, 0);
    opacity: 0.8;
    bottom: 0;
    left: 0;
    z-index: -1;
}

.wave:nth-of-type(2) {
    bottom: -1.25em;
    animation: wave 18s linear reverse infinite;
    opacity: 0.8;
}

.wave:nth-of-type(3) {
    bottom: -2.5em;
    animation: wave 20s -1s reverse infinite;
    opacity: 0.9;
}

@keyframes wave {
    2% {
        transform: translateX(1);
    }

    25% {
        transform: translateX(-25%);
    }

    50% {
        transform: translateX(-50%);
    }

    75% {
        transform: translateX(-25%);
    }

    100% {
        transform: translateX(1);
    }
}

/* Container styling */
.container {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    width: 70%;
    max-width: 600px;
    margin: 0 auto;
    margin-top: 40px;
    z-index: 1;
    animation: breathe 4s ease-in-out infinite; /* Breathing animation */
}

/* Breathing animation */
@keyframes breathe {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.03);
    }
    100% {
        transform: scale(1);
    }
}

/* Heading styling */
h1 {
    margin-bottom: 20px;
    font-size: 2.5em;
    color: #ffffff;
    font-weight: bold;
}

/* Button styling */
button {
    background-color: #00b7ff;
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

button:hover {
    background-color: #009adf;
    transform: scale(1.05);
}

/* Form styling */
form {
    margin-bottom: 20px;
}

/* Form group styling */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

/* Label styling */
label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #ffffff;
    font-size: 1em;
}

/* Textarea styling */
textarea {
    width: 80%; /* Full width */
    max-width: 100%; /* Ensure it doesn't exceed container width */
    padding: 12px;
    border-radius: 10px;
    border: 2px solid #00b7ff;
    font-size: 1em;
    resize: vertical;
    background: #ffffff;
    color: #333;
    transition: border-color 0.3s ease, background 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Adjusted textarea for better fit */
textarea {
    min-height: 80px; /* Set a minimum height */
}

/* Textarea focus styling */
textarea:focus {
    border-color: #009adf;
    background: #f0f0f0;
    outline: none;
}

/* QR Code container styling */
.qr-code-container {
    margin-top: 20px;
}

/* Text to copy container styling */
.text-to-copy {
    margin-top: 20px;
    font-family: monospace;
    white-space: pre-wrap;
}

/* Theme toggle button styling */
.theme-toggle {
    background-color: #00b7ff;
    color: #fff;
    position: fixed; /* Fixed position for top left corner */
    top: 20px;
    left: 20px;
    padding: 12px 20px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease, transform 0.3s ease;
    z-index: 2; /* Ensure it is on top of the content */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.theme-toggle:hover {
    background-color: #009adf;
    transform: scale(1.05);
}

/* Dark mode styles */
body.dark-mode {
    background: linear-gradient(315deg, rgba(20,20,20,1) 0%, rgba(30,30,30,1) 25%, rgba(20,20,20,1) 50%, rgba(10,10,10,1) 75%, rgba(20,20,20,1) 100%);
    color: #e0e0e0;
}

/* Light mode styles */
body.light-mode {
    background: linear-gradient(315deg, rgba(0,183,255,1) 0%, rgba(60,132,206,1) 25%, rgba(0,183,255,1) 50%, rgba(0,205,255,1) 75%, rgba(0,183,255,1) 100%);
    color: #ffffff;
}

/* Dark mode textarea styling */
body.dark-mode textarea {
    background: #333;
    color: #fff;
    border: 2px solid #555;
}

/* Light mode textarea styling */
body.light-mode textarea {
    background: #fff;
    color: #333;
    border: 2px solid #00b7ff;
}

/* Adjusting the position of waves and container */
body {
    padding-bottom: 6em; /* Space for the wave effect */
}

/* Responsive styles */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin-top: 40px;
    }
    .form-group {
        text-align: center;
    }

    h1 {
        font-size: 2em;
    }

    button {
        padding: 10px 20px;
        font-size: 0.9em;
    }

    textarea {
        width: 70%;
        padding: 10px;
        font-size: 0.9em;
    }

    .theme-toggle {
        padding: 10px 15px;
        font-size: 0.9em;
        top: 10px;
        left: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        margin-top: 20px;
    }

    h1 {
        font-size: 1.5em;
    }

    button {
        padding: 8px 15px;
        font-size: 0.8em;
    }

    textarea {
        padding: 8px;
        font-size: 0.8em;
    }

    .theme-toggle {
        padding: 8px 12px;
        font-size: 0.8em;
        top: 5px;
        left: 5px;
    }
}
