/* Body & Background */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    color: #333;
    background: linear-gradient(135deg, #e9f4fe, #ffd781); /* Static gradient background */
    background-attachment: fixed;
    user-select: none;
}

.body {
    user-select: none;
}

/* Header */
header {
    background: linear-gradient(135deg, #e4772f, #ffc21b);
    color: white;
    text-align: center;
    padding: 1em;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: opacity 1s;
}

header:hover {
    opacity: 0.5;
}

/* Navigation */
nav {
    background: linear-gradient(135deg, #232526, #414345);
    overflow: hidden;
}

nav a {
    float: left;
    display: block;
    color: white;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
}

nav a:hover {
    background: linear-gradient(135deg, #ffb700, #ffee33);
    color: black;
    transform: scale(1.05);
}

/* Main Content */
main {
    justify-content: center;
    align-items: center;
    display: flex;
    padding: 20px;
    color: #fff;
    max-width: 900px;
    margin: auto;
}

.notepad-container {
    width: 80%;
    max-width: 600px;
    height: 700px;
    padding: 20px;
    background: #fefaf3; /* Light paper color */
    border: 2px solid #d1b394;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-radius: 5px;
    position: relative;
    font-family: "Courier New", Courier, monospace;
    overflow: hidden;
    animation: fadeIn 1s ease-in-out;
    background-image: linear-gradient(
        to bottom,
        #fefaf3,
        #fefaf3 30px,
        #cfcfcf 30px,
        #fefaf3 32px
    ); /* Light gray lines for a subtle effect */
    background-size: 100% 32px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.notepad-title {
    font-size: 24px;
    color: #555;
    text-align: center;
    margin: 0 0 2px;
    
    font-family: 'Poppins', sans-serif;
    font-size: 24px;
    font-weight: 700;  /* Bold */
    color: #333;
    text-align: center;
}

.notepad {
    width: 100%;
    height: 600px; /* Increased for more content space */
    padding: 10px 20px; /* Adjusted padding for alignment */
    font-size: 16px;
    line-height: 1.85; /* Space between lines to align with background */
    border: none;
    outline: none;
    resize: none;
    color: #333;
    font-family: 'Lato', sans-serif;
    font-size: 18px;  /* Adjust based on preference */
    line-height: 1.8;  /* Slightly higher for a relaxed, handwritten look */
    letter-spacing: 0.5px;  /* Small letter spacing to add to realism */
    color: #555555;
    
    box-sizing: border-box;
    background: transparent;
    position: relative;
    z-index: 1;
}

.notepad::placeholder {
    color: #b0a590;
    font-style: italic;
}

.word-count {
    position: absolute;
    bottom: 10px;
    right: 20px;
    font-size: 14px;
    color: #555;
    font-weight: bold;
}








.notepad-buttons {
    display: flex;
    justify-content: space-between;
    padding-top: 10px;
}

.notepad-buttons button {
    flex: 1;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    background: linear-gradient(135deg, #d3d3d3, #e0e0e0);  /* Soft, subtle gradient */
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 4px;
}

#reset-button {
    background: linear-gradient(135deg, #e8e8e8, #f0f0f0);
}

#copy-button {
    background: linear-gradient(135deg, #e8e8e8, #f0f0f0);
}

.notepad-buttons button:hover {
    background: linear-gradient(135deg, #d0d0d0, #e0e0e0);  /* Slightly darker on hover */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.notepad-buttons button:active {
    transform: scale(0.97);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* Icons with even spacing */
#reset-button::before, #copy-button::before {
    content: '';
    display: inline-block;
    margin-right: 5px;
}

#reset-button::before {
    content: '🔄';
}

#copy-button::before {
    content: '📋';
}

/* Main Content */
main {
    justify-content: center;
    align-items: center;
    display: flex;
    flex-direction: column;  /* Stack the items vertically */
    padding: 20px;
    color: #fff;
    max-width: 900px;
    margin: auto;
}

/* Styling for the 'Choose Writing Topic' button */
.notepad-topic-button {
    display: block;
    width: 80%;  /* Same width as the notepad container */
    max-width: 600px;  /* Same max width as the notepad */
    margin-top: 20px;  /* Space between the notepad and button */
    padding: 10px;
    text-align: center;
    background: linear-gradient(135deg, #e4772f, #ffc21b);  /* Brighter orange gradient */
    color: white;
    font-size: 16px;
    font-weight: bold;
    border: 1px solid #ff7e5f;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.5s;  /* Smoother transition */
}

.notepad-topic-button:hover {
    transform: scale(1.05);
}

.notepad-topic-button:active {
    transform: scale(0.98);
}

@media (max-width: 768px) {
    .notepad-container {
        height: auto;  /* Remove fixed height */
        padding: 15px;  /* Reduce padding */
        width: 95%;  /* Make the container more fluid */
    }

    .notepad {
        font-size: 18px;  /* Adjust font size */
        line-height: 1.6;  /* Adjust line spacing */
        height: 400px;  /* Reduce height */
    }

    .word-count {
        font-size: 12px;  /* Adjust word count font size */
    }

    .notepad-buttons {
        flex-direction: column;  /* Stack buttons vertically */
        gap: 7px;  /* Add space between buttons */
        margin-bottom: 10px;
    }

    .notepad-buttons button {
        font-size: 14px;  /* Adjust button text size */
        padding: 6px 12px;  /* Adjust button padding */
    }
}