* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #4361ee;
    --secondary: #3a0ca3;
    --accent: #4cc9f0;
    --success: #2ec4b6;
    --warning: #ff9f1c;
    --danger: #e71d36;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --light-gray: #e9ecef;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 1200px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    min-height: 90vh;
}

/* Left Panel - Branding */
.brand-panel {
    flex: 1;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.logo-container {
    margin-bottom: 30px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.logo-placeholder {
    width: 280px;
    height: 80px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
    color: var(--primary);
    font-weight: bold;
    font-size: 1.5rem;
}

.brand-panel p {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 400px;
    margin-bottom: 30px;
}

.features {
    text-align: left;
    width: 100%;
    max-width: 400px;
}

.feature {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.feature i {
    font-size: 1.5rem;
    margin-right: 15px;
    color: var(--accent);
}

.feature div p {
    font-size: 0.9rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
}

/* Right Panel - Content */
.content-panel {
    flex: 1.5;
    padding: 40px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-y: auto;
}

/* Login/Signup Forms */
.auth-form {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.form-title {
    text-align: center;
    margin-bottom: 40px;
    color: var(--dark);
}

.form-title h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.form-title p {
    color: var(--gray);
}

.input-group {
    margin-bottom: 25px;
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark);
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--light-gray);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.btn {
    padding: 15px;
    border-radius: 10px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: block;
    width: 100%;
}

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

.btn-primary:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

.btn-disabled {
    background: var(--light-gray);
    color: var(--gray);
    cursor: not-allowed;
}

.btn-disabled:hover {
    transform: none;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--gray);
}

.form-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

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

/* Verification Code Page */
.verification-code {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
}

.code-input {
    width: 60px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    border: 2px solid var(--light-gray);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.code-input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 20px;
    background-color: rgba(46, 196, 182, 0.1);
    border-radius: 10px;
    margin-bottom: 25px;
    border: 1px solid var(--success);
}

.success-message i {
    font-size: 3rem;
    color: var(--success);
    margin-bottom: 15px;
}

.success-message h3 {
    color: var(--success);
    margin-bottom: 10px;
}

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--light-gray);
}

.user-info {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin-right: 15px;
}

.upload-stats {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    border-radius: 15px;
    padding: 20px;
    color: white;
    margin-bottom: 30px;
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.2);
}

.stats-content {
    display: flex;
    justify-content: space-between;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin-top: 15px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: white;
    width: 70%;
    border-radius: 4px;
}

.upload-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 2px dashed var(--light-gray);
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-section:hover {
    border-color: var(--primary);
    background: #f8fbff;
}

.upload-section.disabled {
    border-color: var(--light-gray);
    background: var(--light);
    cursor: not-allowed;
}

.upload-section.disabled:hover {
    border-color: var(--light-gray);
    background: var(--light);
}

.upload-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.upload-section.disabled .upload-icon {
    color: var(--gray);
}

.upload-text h3 {
    margin-bottom: 10px;
    color: var(--dark);
}

.upload-text p {
    color: var(--gray);
    margin-bottom: 20px;
}

.cooldown-timer {
    margin-top: 15px;
    font-weight: 600;
    color: var(--danger);
}

.btn-upload {
    background: var(--primary);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-upload:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

.btn-upload:disabled {
    background: var(--light-gray);
    color: var(--gray);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.recent-uploads {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.5rem;
    color: var(--dark);
}

.upload-list {
    list-style: none;
}

.upload-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--light-gray);
}

.upload-item:last-child {
    border-bottom: none;
}

.file-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.file-icon {
    width: 40px;
    height: 40px;
    background: var(--light-gray);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
    color: var(--primary);
}

.file-details h4 {
    margin-bottom: 5px;
    color: var(--dark);
}

.file-details p {
    color: var(--gray);
    font-size: 0.9rem;
}

.analysis-results {
    display: flex;
    align-items: center;
    gap: 10px;
}

.result {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    position: relative;
}

.plagiarism {
    background: rgba(233, 30, 99, 0.1);
    color: #e91e63;
}

.ai {
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
}

.processing-circle {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-left-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

.download-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    margin-left: 5px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.download-btn:hover {
    color: var(--secondary);
    transform: translateY(-1px);
}

.original-download-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.original-download-btn:hover {
    background: var(--secondary);
    transform: translateY(-1px);
}

.delete-btn {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    margin-left: 10px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.delete-btn:hover {
    color: #b91d1d;
    transform: scale(1.1);
}

.logout-btn {
    background: var(--light-gray);
    color: var(--dark);
    padding: 8px 20px;
    border-radius: 50px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #e2e6ea;
}

/* Page Transitions */
.page {
    display: none;
    width: 100%;
}

.page.active {
    display: block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 900px) {
    .container {
        flex-direction: column;
        min-height: auto;
    }

    .brand-panel,
    .content-panel {
        padding: 30px 20px;
    }

    .upload-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .analysis-results {
        margin-top: 10px;
        width: 100%;
        justify-content: flex-start;
    }

    .stats-content {
        flex-direction: column;
        gap: 15px;
    }

    .stat-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .logo-placeholder {
        width: 220px;
        height: 70px;
    }

    .verification-code {
        justify-content: center;
        gap: 10px;
    }

    .code-input {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 600px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .upload-stats {
        padding: 15px;
    }

    .analysis-results {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .logo-placeholder {
        width: 180px;
        height: 60px;
    }

    .feature {
        flex-direction: column;
        text-align: center;
    }

    .feature i {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .verification-code {
        flex-wrap: wrap;
    }

    .code-input {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}