/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.navbar-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #3498db;
}

.user-info {
    color: #3498db;
    font-weight: 500;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1rem;
    font-family: inherit;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.user-info:hover {
    color: #2980b9;
}

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.user-dropdown.show .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-user-menu {
    position: relative;
    display: inline-block;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
    margin-top: 0.5rem;
    z-index: 1000;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s, transform 0.2s;
}

.user-dropdown.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
    white-space: nowrap;
}

.dropdown-item:hover {
    background: #f8f9fa;
}

.dropdown-item.logout {
    border-top: 1px solid #eee;
    color: #e74c3c;
}

.dropdown-item.logout:hover {
    background: #fee;
}

.btn-link {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
    padding: 0;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 180px);
    padding: 2rem 0;
}

/* Alerts */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-success {
    background-color: #27ae60;
    color: white;
}

.btn-success:hover {
    background-color: #229954;
}

.btn-warning {
    background-color: #f39c12;
    color: white;
}

.btn-warning:hover {
    background-color: #e67e22;
}

/* Welcome Page */
.welcome-container {
    text-align: center;
    padding: 2rem;
}

.welcome-container h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 3rem;
}

.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.feature-card p {
    color: #7f8c8d;
    margin-bottom: 1.5rem;
}

.info-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
}

.info-section h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.info-section ul {
    list-style: none;
    padding-left: 0;
}

.info-section li {
    padding: 0.5rem 0;
    color: #555;
}

/* Create Page */
.create-page-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.create-page-container h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.create-page-container > p {
    color: #7f8c8d;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
}

.form-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.info-box {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 4px;
    border-left: 4px solid #3498db;
    margin-top: 2rem;
}

.info-box h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.info-box ul {
    list-style: none;
    padding-left: 0;
}

.info-box li {
    padding: 0.3rem 0;
    color: #555;
}

/* Upload Page */
.upload-page-container {
    max-width: 900px;
    margin: 0 auto;
}

.page-header {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.page-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.page-header h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.page-header-top h1 {
    margin-bottom: 0;
}

.btn-edit {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.page-content {
    color: #7f8c8d;
    margin-bottom: 1rem;
}

.page-info {
    display: flex;
    gap: 2rem;
    color: #555;
    flex-wrap: wrap;
}

.short-link strong,
.upload-count strong {
    color: #3498db;
}

.deadline-info {
    display: inline-block;
}

.deadline-active {
    color: #27ae60;
    font-weight: 500;
}

.deadline-active strong {
    color: #27ae60;
}

.deadline-expired {
    color: #e74c3c;
    font-weight: 500;
}

.deadline-expired strong {
    color: #e74c3c;
}

.upload-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.upload-section h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.drop-zone {
    border: 3px dashed #ddd;
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s;
    cursor: pointer;
}

.drop-zone:hover {
    border-color: #3498db;
    background: #f0f8ff;
}

.drop-zone.drag-over {
    border-color: #27ae60;
    background: #e8f8f5;
}

.drop-zone-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.drop-zone-text {
    color: #7f8c8d;
    margin-bottom: 1rem;
}

.drop-zone-limit {
    color: #e74c3c;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    margin-top: 0;
}

#fileInfo {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.upload-status {
    margin-top: 1rem;
}

.files-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.files-section h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.files-list {
    display: grid;
    gap: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1rem;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #3498db;
}

.file-icon {
    font-size: 1rem;
}

.file-details {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.file-name {
    font-weight: 500;
    color: #2c3e50;
}

.file-separator {
    color: #bdc3c7;
    font-weight: 300;
}

.file-size {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.file-date {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.btn-download {
    padding: 0.4rem 0.7rem;
    font-size: 1rem;
    text-decoration: none;
    background: #3498db;
    color: white;
    border-radius: 4px;
    transition: background 0.3s;
    flex-shrink: 0;
}

.btn-download:hover {
    background: #2980b9;
}

.file-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.no-files {
    text-align: center;
    color: #7f8c8d;
    padding: 2rem;
}

/* Progress Bar */
.progress-container {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #555;
}

.progress-bar {
    width: 100%;
    height: 24px;
    background: #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 12px;
    transition: width 0.3s ease;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-detail {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #7f8c8d;
    text-align: center;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 500px;
    padding: 16px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    flex-shrink: 0;
}

.toast-success {
    border-left: 4px solid #27ae60;
}

.toast-success .toast-icon {
    background: #27ae60;
    color: white;
}

.toast-error {
    border-left: 4px solid #e74c3c;
}

.toast-error .toast-icon {
    background: #e74c3c;
    color: white;
}

.toast-message {
    flex: 1;
    color: #333;
    font-size: 14px;
    line-height: 1.4;
}

/* List Page */
.list-page-container {
    max-width: 1000px;
    margin: 0 auto;
}

.list-page-container h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.list-page-container > p {
    color: #7f8c8d;
    margin-bottom: 1.5rem;
}

.actions {
    margin-bottom: 2rem;
}

.pages-list {
    display: grid;
    gap: 1.5rem;
}

.page-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.page-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.page-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

.page-card-header h3 {
    color: #2c3e50;
    margin: 0;
}

.badge {
    background: #3498db;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.page-card-body {
    padding: 1.5rem;
}

.page-description {
    color: #555;
    margin-bottom: 1rem;
}

.page-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: #7f8c8d;
    flex-wrap: wrap;
}

.page-stats .deadline-active {
    color: #27ae60;
}

.page-stats .deadline-expired {
    color: #e74c3c;
}

.page-card-footer {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.empty-state p {
    color: #7f8c8d;
    margin-bottom: 1.5rem;
}

/* Footer */
.footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 3rem;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    .navbar-nav {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .feature-cards {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .page-info {
        flex-direction: column;
        gap: 0.5rem;
    }

    .page-card-footer {
        flex-direction: column;
    }

    .file-meta {
        flex-direction: column;
        gap: 0.3rem;
    }
}
