/* Global Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f4f9;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 2em auto;
    padding: 2em;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Navbar */
.navbar {
    background: #fff;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #007bff;
}

.navbar .nav-links a {
    color: #333;
    text-decoration: none;
    padding: 0.5rem 1rem;
}

.navbar .nav-links a.button {
    background-color: #007bff;
    color: white;
    border-radius: 4px;
}

.navbar .nav-links a.button:hover {
    background-color: #0056b3;
}

/* Hero Section (Homepage) */
.hero {
    background: #007bff;
    color: white;
    text-align: center;
    padding: 4rem 2rem;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Features Section (Homepage) */
.features {
    padding: 4rem 2rem;
    text-align: center;
}

.features h2 {
    font-size: 2.2rem;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-item {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.feature-item h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #007bff;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 2rem;
}

.footer p {
    margin: 0;
}

.footer a {
    color: #00aaff;
    text-decoration: none;
}

/* Login/Register/Password Form */
.form-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.form-box {
    background: #fff;
    padding: 2em;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    width: 340px;
}

.form-box h2 {
    text-align: center;
    color: #333;
    margin-bottom: 1.5em;
}

.form-group {
    margin-bottom: 1em;
}

.form-group label {
    display: block;
    margin-bottom: 0.5em;
    color: #555;
}

.form-group input[type="text"], 
.form-group input[type="password"],
.form-group input[type="file"],
.form-group select {
    width: 100%;
    padding: 0.5em;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-group.agreement {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5em;
    font-size: 0.9em;
}

.form-group.agreement input[type="checkbox"] {
    margin-top: 3px;
    margin-right: 8px;
}

.form-group.agreement label {
    margin-bottom: 0;
    color: #666;
}

.form-group.agreement a {
    color: #007bff;
    text-decoration: none;
}

.form-group.agreement a:hover {
    text-decoration: underline;
}

.delete-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 0.4em 0.8em;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s ease;
}

.delete-btn:hover {
    background-color: #c82333;
}

button[type="submit"] {
    width: 100%;
    padding: 0.7em;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
}

button[type="submit"]:hover {
    background-color: #0056b3;
}

.message {
    text-align: center;
    margin-top: 1em;
    padding: 1em;
    border-radius: 4px;
    font-size: 0.9em;
}

.message.error {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

.message.success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

/* Dashboard */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    padding-bottom: 1em;
    margin-bottom: 1em;
}

.header h2 {
    margin: 0;
    color: #333;
}

.header a {
    text-decoration: none;
    background: #dc3545;
    color: white;
    padding: 0.5em 1em;
    border-radius: 4px;
}

.header a:hover {
    background: #c82333;
}

.upload-box {
    background: #fdfdfd;
    border: 2px dashed #ddd;
    padding: 2em;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 2em;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2em;
}

th, td {
    padding: 0.8em;
    text-align: left;
    border-bottom: 1px solid #ddd;
    word-break: break-all;
}

th {
    background-color: #f8f9fa;
}

.link-input {
    width: 100%;
    background: #eee;
    border: 1px solid #ccc;
    padding: 0.3em;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 2em;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    text-align: center;
}

.progress-bar-container {
    width: 100%;
    background: #e9ecef;
    border-radius: .25rem;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 20px;
    background-color: #007bff;
    text-align: center;
    color: white;
    line-height: 20px;
    transition: width 0.1s linear;
}

#progress-text {
    font-weight: bold;
    margin-top: 0.5em;
}

#progress-details {
    margin-top: 0.5em;
    color: #6c757d;
}
