/* General Styling */
body {
    font-family: 'Poppins', sans-serif; /* Trendy sans-serif font */
    margin: 0;
    padding: 0;
    background: #f9f9f9;
    color: #333;
    line-height: 1.6;
}

#fileContents {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
}

/* Header Styling */
header {
    background-color: #1976d2; /* Blue header for a sleek, modern look */
    padding: 10px 20px; /* Reduced padding to take up less vertical space */
    color: #fff;
    text-align: center;
    font-size: 1.6rem; /* Reduced font size */
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* Subtle shadow for a clean look */
    border-bottom: 3px solid #0781fa; /* Slight border to define the bottom edge */
    width: 100%;
    margin: 0;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    height: auto;
}

/* Container Styling */
.container {
    max-width: 900px;
    margin: 60px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.1);
    border: 2px solid #ddd;
}

/* Form Elements */
.form-group {
    margin-bottom: 30px;
}

label {
    font-weight: bold;
    color: #333;
}

select, textarea, input {
    width: 100%;
    padding: 14px;
    margin-top: 8px;
    border-radius: 12px;
    border: 2px solid #ddd;
    background-color: #f9f9f9;
    color: #333;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

select:focus, textarea:focus, input:focus {
    border-color: #1976d2; /* Blue on focus */
    outline: none;
    background-color: #e3f2fd;
}

/* Button Styles */
button {
    width: 100%;
    padding: 16px;
    background-color: #1976d2;
    border: none;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-sizing: border-box;
}

button:hover {
    background-color: #1565c0;
    transform: translateY(-3px);
}

button:disabled {
    background-color: #b0bec5;
    cursor: not-allowed;
}

/* Status and Popup */
.status {
    margin-top: 20px;
    font-size: 16px;
    font-weight: 600;
    color: #388e3c; /* Green color for success messages */
}

.popup-box {
    display: none;
    color: white;
    border-radius: 12px;
    padding: 20px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    width: 320px;
    font-size: 1.2rem;
    font-weight: 500;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.popup-success {
    background-color: #4caf50;
}

.popup-error {
    background-color: #f44336;
}

.popup-box button {
    background-color: #0288d1;
    padding: 12px;
    color: white;
    font-size: 1.1rem;
    border-radius: 10px;
    cursor: pointer;
    width: 120px;
    margin-top: 20px;
    border: none;
}

.popup-box button:hover {
    background-color: #0277bd;
}

/* File View and Text Display */
#viewContent {
    display: none;
}

pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    background-color: #f4f4f9;
    padding: 18px;
    border-radius: 12px;
    border: 2px solid #ddd;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    color: #333;
    overflow-x: auto;
}

/* Copy Button */
#copyButton {
    margin-top: 15px;
    padding: 14px;
    background-color: #66bb6a;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 10px;
    font-size: 1.1rem;
}

#copyButton:hover {
    background-color: #388e3c;
}

#copyButton:disabled {
    background-color: #b0bec5;
    cursor: not-allowed;
}

/* View File Button */
.viewFileButton {
    background-color: #388e3c;
    color: white;
    border: none;
    font-size: 1.1rem;
    padding: 14px;
    text-align: center;
    display: block;
    width: 100%;
    cursor: pointer;
    text-decoration: none;
    border-radius: 10px;
    margin-top: 12px;
    box-sizing: border-box;
}

.viewFileButton:hover {
    background-color: #2c6e2f;
}

/* Spinner styling */
.spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 9999;
    width: 60px;
    height: 60px;
    transition: opacity 0.3s ease-in-out; /* Smooth fade-in */
}

.spinner-icon {
    border: 6px solid #e0e0e0;
    border-top: 6px solid #1976d2;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); /* Subtle shadow effect */
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.spinner.show {
    display: block;
    opacity: 1;
}

.spinner.hide {
    display: none;
    opacity: 0;
}

/* Privacy Note */
.privacyNote {
    font-size: 14px;
    color: #777;
    margin-top: 30px;
    text-align: center;
}

/* Responsive Styling */
@media (max-width: 1200px) {
    .container {
        padding: 30px;
    }

    header {
        font-size: 1.8rem;
        padding: 10px 20px; /* Further reduced padding */
    }

    button, .viewFileButton, #copyButton {
        font-size: 1rem;
        padding: 14px;
    }

    .popup-box {
        width: 320px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 25px;
    }

    header {
        font-size: 1.6rem;
        padding: 10px 20px; /* Reduced padding for smaller screens */
    }

    .viewFileButton, button {
        font-size: 1rem;
        padding: 12px;
    }
}
