/* Main Styles */
:root {
    --primary-color: #22437a;
    --secondary-color: #084ec2;
    --accent-color: #608bc1;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --border-color: #ddd;
    --transition-speed: 0.3s;
    --box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    --hover-transform: translateY(-5px);
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    overflow-x: hidden;
}

/* Animation Keyframes */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Navigation */
.navbar {
    background-color: var(--primary-color);
    padding: 0.6rem 1.8rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all var(--transition-speed);
}

.navbar.scrolled {
    padding: 0.4rem 1.8rem;
    background-color: rgba(34, 67, 122, 0.95);
    backdrop-filter: blur(10px);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
}

.navbar-brand {
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all var(--transition-speed);
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-logo {
    height: 35px;
    margin-right: 0.6rem;
    background-color: white;
    padding: 3px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: all var(--transition-speed);
}

.navbar-brand:hover .navbar-logo {
    transform: rotate(5deg);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.4rem 0.7rem;
    border-radius: 4px;
    transition: all var(--transition-speed);
    font-size: 0.9rem;
    position: relative;
}

.nav-links a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: white;
    transition: all var(--transition-speed);
    transform: translateX(-50%);
}

.nav-links a:hover:after {
    width: 80%;
}

.nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(34, 67, 122, 0.8), rgba(8, 78, 194, 0.9)), url('../images/library-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 6rem 2rem;
    text-align: center;
    margin: -2rem -2rem 2rem -2rem;
    position: relative;
    overflow: hidden;
} 

.hero-section:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(96, 139, 193, 0.3) 0%, rgba(34, 67, 122, 0) 70%);
    animation: pulse 8s infinite ease-in-out;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    animation: fadeIn 1s ease-out;
}

.hero-content h1 {
    font-size: 3.2rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.hero-buttons .btn {
    animation: fadeIn 1.2s ease-out;
    transition: all var(--transition-speed);
    transform-origin: center;
}

.hero-buttons .btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Statistics Section */
.stats-section {
    padding: 3rem 0;
    background-color: white;
    position: relative;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.8rem;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: all var(--transition-speed);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.8s ease-out;
}

.stat-card:nth-child(1) {
    animation-delay: 0.1s;
}

.stat-card:nth-child(2) {
    animation-delay: 0.3s;
}

.stat-card:hover {
    transform: var(--hover-transform);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.stat-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
}

.stat-card h3 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.4rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--accent-color);
    margin: 0.5rem 0;
}

.stat-description {
    color: #666;
    font-size: 0.95rem;
}

/* Recent Uploads Section */
.recent-uploads-section {
    padding: 4rem 0;
    background-color: var(--light-gray);
    margin: 2rem -2rem;
    position: relative;
}

.recent-uploads-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    position: relative;
    display: block;
    width: 100%;
    animation: fadeIn 0.8s ease-out;
}

.recent-uploads-section h2:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
}

.recent-uploads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.upload-card {
    background: white;
    padding: 1.8rem;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    transition: all var(--transition-speed);
    animation: fadeIn 1s ease-out;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.upload-card:nth-child(odd) {
    animation: slideInLeft 1s ease-out;
}

.upload-card:nth-child(even) {
    animation: slideInRight 1s ease-out;
}

.upload-card:hover {
    transform: var(--hover-transform);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.upload-card h3 {
    color: var(--primary-color);
    margin-top: 0;
    font-size: 1.3rem;
}

.upload-meta {
    display: flex;
    justify-content: space-between;
    color: #666;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.upload-abstract {
    margin: 1rem 0;
    color: #444;
    line-height: 1.6;
    flex-grow: 1;
}

.upload-card .btn {
    align-self: flex-start;
    margin-top: auto;
    transition: all var(--transition-speed);
}

.upload-card .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Call to Action Section */
.cta-section {
    background-color: var(--primary-color);
    background-image: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    text-align: center;
    padding: 5rem 2rem;
    margin: 2rem -2rem -2rem -2rem;
    position: relative;
    overflow: hidden;
}

.cta-section:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/pattern.png');
    opacity: 0.1;
    animation: pulse 15s infinite linear;
}

.cta-section:after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 60%);
    animation: ctaPulse 10s infinite ease-in-out;
    z-index: 1;
}

@keyframes ctaPulse {
    0% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.5); opacity: 0.2; }
    100% { transform: scale(1); opacity: 0.5; }
}

.cta-section .container {
    position: relative;
    z-index: 2;
}

.cta-section h2 {
    margin-bottom: 1rem;
    font-size: 2.2rem;
    position: relative;
    z-index: 2;
    animation: fadeIn 0.8s ease-out;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cta-section p {
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 2;
    animation: fadeIn 1s ease-out;
    font-size: 1.1rem;
}

.cta-section .btn {
    position: relative;
    z-index: 2;
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    background-color: white;
    color: var(--primary-color);
    transition: all var(--transition-speed);
    animation: fadeIn 1.2s ease-out;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: none;
    font-weight: 500;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.cta-section .btn:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.cta-section .btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s;
}

.cta-section .btn:hover:before {
    left: 100%;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-speed);
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .features-grid,
    .recent-uploads-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-section,
    .features-section,
    .cta-section {
        margin: -1rem -1rem 1rem -1rem;
        padding: 3rem 1rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

/* Main Content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-title {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

/* Search Results */
.search-result {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.search-result h3 {
    margin-top: 0;
    color: var(--primary-color);
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

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

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

/* Dashboard Widgets */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    margin-top: 0;
    color: var(--primary-color);
}

/* File Upload */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.upload-area.dragover {
    border-color: var(--accent-color);
    background-color: var(--light-gray);
}

/* Plagiarism Report */
.similarity-score {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    margin: 1rem 0;
}

.similarity-high {
    color: #dc3545;
}

.similarity-medium {
    color: #ffc107;
}

.similarity-low {
    color: #28a745;
}

/* Icon Badge for stats */
.document-stats {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 1.5rem;
}

.document-stats .icon-badge-group {
    display: inline-block;
    position: relative;
}

.document-stats .icon-badge {
    position: absolute;
    top: -8px;
    right: -15px;
    background-color: var(--primary-color);
    color: white;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 50%;
    line-height: 1;
    min-width: 18px;
    text-align: center;
    border: 2px solid white;
}

.document-stats .fas {
    font-size: 1.75rem;
    color: var(--text-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }
}
