/* =============================================
   Free Plagiarism Checker - Main Stylesheet
   Version: 2.0
   Author: Your Name
   ============================================= */

/* ==================== 
   Base Styles 
   ==================== */
:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --secondary-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --gray-color: #95a5a6;
    --text-color: #333;
    --text-light: #7f8c8d;
    --border-radius: 0.375rem;
    --box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f8f9fa;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* ==================== 
   Typography 
   ==================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }

.text-center { text-align: center; }
.text-muted { color: var(--text-light); }

/* ==================== 
   Layout Components 
   ==================== */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Header Styles */
header {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand img {
    height: 40px;
    width: auto;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
}

/* Main Content */
main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Footer Styles */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

footer a {
    color: var(--light-color);
}

footer a:hover {
    color: white;
    text-decoration: underline;
}


/* ====================
   Header Styles
   ==================== */
header {
    background-color: #3498db;
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

.navbar-brand img {
    height: 40px;
    width: auto;
}

.navbar-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    padding: 0.5rem 0;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link:focus {
    color: white;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: white;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu toggle */
.navbar-toggler {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Responsive styles */
@media (max-width: 992px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .navbar-nav {
        flex-direction: column;
        width: 100%;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .navbar-nav.active {
        max-height: 500px;
        padding: 1rem 0;
    }
    
    .nav-item {
        padding: 0.5rem 0;
    }
    
    .navbar-toggler {
        display: block;
        position: absolute;
        right: 1rem;
        top: 1rem;
    }
}

/* ==================== 
   Form Elements 
   ==================== */
.form-control {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-color);
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

textarea.form-control {
    min-height: 200px;
    resize: vertical;
}

label {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-danger {
    color: #fff;
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-danger:hover {
    background-color: #c0392b;
    border-color: #c0392b;
}

.btn-lg {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
}

/* Cards */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    box-shadow: var(--box-shadow);
}

.card-body {
    flex: 1 1 auto;
    padding: 1.5rem;
}

.card-header {
    padding: 1rem 1.5rem;
    margin-bottom: 0;
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

/* Alerts */
.alert {
    position: relative;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* ==================== 
   Tool Specific Styles 
   ==================== */
/* Plagiarism Checker */
.checker-tool {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
}

.checker-tool textarea {
    min-height: 300px;
    border: 2px solid #e9ecef;
    transition: var(--transition);
}

.checker-tool textarea:focus {
    border-color: var(--primary-color);
}

/* Results Display */
.originality-score {
    font-size: 3rem;
    font-weight: 700;
}

.score-excellent { color: var(--secondary-color); }
.score-good { color: var(--warning-color); }
.score-poor { color: var(--danger-color); }

.progress {
    height: 30px;
    background-color: #e9ecef;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    line-height: 30px;
    color: white;
    text-align: center;
    background-color: var(--primary-color);
    transition: width 0.6s ease;
}

/* Plagiarism Remover */
.rewrite-container {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 992px) {
    .rewrite-container {
        grid-template-columns: 1fr 1fr;
    }
}

.original-text, .rewritten-text {
    position: relative;
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    background-color: white;
}

.text-label {
    position: absolute;
    top: -10px;
    left: 15px;
    background: white;
    padding: 0 10px;
    font-weight: 600;
    color: var(--primary-color);
}

/* ==================== 
   Utility Classes 
   ==================== */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 2rem; }

.rounded { border-radius: var(--border-radius); }
.shadow { box-shadow: var(--box-shadow); }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }

@media (min-width: 768px) {
    .d-md-none { display: none; }
    .d-md-block { display: block; }
    .d-md-flex { display: flex; }
}

/* ==================== 
   Animations 
   ==================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* ==================== 
   Print Styles 
   ==================== */
@media print {
    header, footer, .no-print {
        display: none;
    }
    
    body {
        background: white;
        color: black;
        font-size: 12pt;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }
    
    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        font-weight: normal;
    }
}


/* Add to your existing style.css */
/* Copyright warning styles */
.alert-warning {
    border-left: 4px solid #ffc107;
}

/* Similarity badges */
.badge.bg-danger { background-color: #dc3545; }
.badge.bg-warning { background-color: #ffc107; color: #000; }
.badge.bg-success { background-color: #28a745; }

/* Rewritten content highlight */
.rewritten-content {
    border-left: 3px solid #28a745;
    background-color: #f8fff8;
}

/* Fixed alert for copy notifications */
.alert.fixed-top {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    z-index: 2000;
}

/* Rephrase button animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner-border {
    animation: spin 0.75s linear infinite;
    display: inline-block;
    width: 1rem;
    height: 1rem;
    vertical-align: text-bottom;
    border: 0.2em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
}

