@font-face {
    font-family: 'DedekMrazFont';
    src: url('fonts/Sofia-Regular.ttf') format('truetype'),
         url('fonts/Sofia-Regular.woff') format('woff'),
         url('fonts/Sofia-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

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

body, html {
    height: 100%;
    font-family: 'DedekMrazFont', cursive;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

.background {
    background: url('christmas.jpg') no-repeat center center/cover;
    min-height: 100vh; /* Ensure the background always covers the entire viewport */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px; /* Add padding to prevent elements from touching edges */
}

.container {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 30px; /* Restored original padding */
    border-radius: 10px;
    text-align: center;
    max-width: 500px; /* Reduced max-width for better fit on smaller screens */
    width: 100%;
    margin-top: 20px;
}

h1 {
    margin-bottom: 15px;
    font-size: 2.2em;
    color: #d63333;
}

p {
    margin-bottom: 20px;
    font-size: 1.2em;
    color: #444;
}

form {
    display: flex;
    flex-direction: column;
}

label {
    margin: 10px 0 5px;
    font-weight: bold;
    color: #d63333;
    text-align: left;
}

input, textarea {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-family: 'DedekMrazFont', cursive;
    font-size: 1em;
}

button {
    padding: 15px;
    background-color: #d63333;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2em;
}

button:hover {
    background-color: #a82828;
}

#countdown {
    position: relative;
    margin: 20px auto;
    padding: 10px 15px;
    background-color: #d63333;
    color: #fff;
    font-weight: bold;
    font-size: 1.5em;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
}

#successMessage {
    display: none;
    margin-top: 15px;
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Snowflake effect within #countdown */
#countdown .snowflake {
    position: absolute;
    top: -40px; /* Start from above the countdown div */
    font-size: 1em;
    color: #fff;
    animation: fall linear infinite;
    opacity: 0.8;
    pointer-events: none; /* Make snowflakes non-interactive */
}

@keyframes fall {
    0% {
        transform: translateY(-40px);
    }
    100% {
        transform: translateY(100px); /* Limited height to ensure snowflakes stay within countdown */
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    body, html {
        height: auto; /* Adjust height to prevent scroll issues */
    }

    .background {
        padding: 10px; /* Reduce padding for smaller screens */
    }

    .container {
        padding: 30px; /* Restore original padding for aesthetics */
    }

    h1 {
        font-size: 1.8em;
    }

    p {
        font-size: 1em;
    }

    #countdown {
        font-size: 1.2em;
        padding: 8px 12px;
    }

    input {
        padding: 8px;
        font-size: 0.9em;
    }

    button {
        font-size: 1em;
        padding: 12px;
    }

    #countdown .snowflake {
        font-size: 0.8em; /* Even smaller snowflakes for mobile */
    }

    @keyframes fall {
        0% {
            transform: translateY(-40px);
        }
        100% {
            transform: translateY(80px); /* Reduce height for better visibility on mobile */
        }
    }
}

/* Admin-Specific Styles */
.admin-body {
    font-family: Arial, sans-serif; /* Use a professional, readable font for admin pages */
}

.background-admin {
    background: url('admin.jpg') no-repeat center center/cover;
    min-height: 100vh; /* Ensure background covers the entire viewport */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container-admin {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 30px; /* Restored original padding for visual consistency */
    border-radius: 10px;
    text-align: center;
    max-width: 800px; /* Slightly wider for admin pages */
    width: 100%;
    font-family: Arial, sans-serif; /* Ensure the container uses the admin font */
}

/* Styling for Admin Table */
table.admin-table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
}

table.admin-table th, table.admin-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
    font-family: Arial, sans-serif; /* Ensure table content is readable */
}

table.admin-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

h1.admin-title, h2.admin-subtitle {
    margin-bottom: 20px;
    color: #d63333;
    font-family: Arial, sans-serif; /* Set admin titles to the admin font */
}

a.admin-link {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #d63333;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
}

a.admin-link:hover {
    background-color: #a82828;
}

a.name-link {
    color: #d63333; /* A consistent color to match your theme */
    text-decoration: none; /* Remove default underline */
    font-weight: bold;
    border: 1px solid #d63333; /* Border to make it look like a button */
    padding: 5px 10px;
    border-radius: 5px;
    transition: all 0.3s ease; /* Smooth transition for hover effect */
    display: inline-block;
}

a.name-link:hover {
    background-color: #d63333; /* Change background on hover */
    color: #fff; /* Change text color to white */
    border-color: #a82828; /* Darker border on hover for contrast */
    text-decoration: none;
}
/* Container for the letter content */
.letter-container {
    background: url('letter_bg.png') no-repeat center center/cover;
    font-family: 'DedekMrazFont', cursive;
    padding: 40px;
    border-radius: 10px;
    max-width: 700px;
    width: 100%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

/* Styling for letter content */
.letter-content {
    font-size: 1.5em;
    line-height: 1.6em;
    color: #3e2723; /* Dark brown color to match a real letter look */
}

.wish-list {
    list-style: decimal inside; /* Numbers for the wishes */
    margin-top: 20px;
    padding-left: 20px;
}