/* Authentication & Landing Page CSS */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    line-height: 1.6;
    color: #333;
}

/* Page System */
.page {
    display: none;
    min-height: 100vh;
}

.page.active {
    display: block;
}

/* Authentication Styles */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.logo-icon {
    font-size: 2.5em;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-header h1 {
    color: #2c3e50;
    font-size: 2em;
    font-weight: 600;
    margin: 0;
}

.auth-header p {
    color: #7f8c8d;
    margin-top: 10px;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 30px;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6c757d;
}

.tab-btn.active {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tab-btn:hover:not(.active) {
    color: #495057;
}

/* Forms */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: #fff;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #6c757d;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.1);
}

.forgot-password {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.forgot-password:hover {
    text-decoration: underline;
}

.auth-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.auth-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.auth-footer p {
    font-size: 12px;
    color: #6c757d;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
}

/* Landing Page Styles */
.landing-container {
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    background: white;
    border-radius: 0;
}

.landing-header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 20px 30px;
    border-radius: 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.landing-header .logo {
    gap: 15px;
}

.landing-header h1 {
    font-size: 1.8em;
    font-weight: 500;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-name {
    font-weight: 500;
}

.logout-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.landing-main {
    padding: 40px 30px;
}

.welcome-section {
    text-align: center;
    margin-bottom: 40px;
}

.welcome-section h2 {
    color: #2c3e50;
    font-size: 2.2em;
    margin-bottom: 10px;
    font-weight: 500;
}

.welcome-section p {
    color: #7f8c8d;
    font-size: 1.1em;
}

/* Projects Section */
.projects-section {
    max-width: 1000px;
    margin: 0 auto;
}

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

.projects-header h3 {
    color: #2c3e50;
    font-size: 1.5em;
    font-weight: 500;
}

.create-project-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.create-project-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.3);
}

.btn-icon {
    font-size: 1.2em;
    font-weight: bold;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.project-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.project-title {
    color: #2c3e50;
    font-size: 1.3em;
    font-weight: 600;
    margin: 0;
}

.project-menu {
    position: relative;
}

.project-menu-btn {
    background: none;
    border: none;
    font-size: 1.2em;
    color: #95a5a6;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.project-menu-btn:hover {
    background: #f8f9fa;
    color: #6c757d;
}

.project-description {
    color: #7f8c8d;
    margin-bottom: 15px;
    font-size: 0.95em;
    line-height: 1.5;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    color: #95a5a6;
    margin-bottom: 15px;
}

.project-actions {
    display: flex;
    gap: 10px;
}

.btn-secondary {
    padding: 8px 16px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-primary {
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-danger {
    padding: 8px 16px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-danger:hover {
    background: #c0392b;
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.empty-icon {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.7;
}

.empty-state h4 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #34495e;
}

.empty-state p {
    margin-bottom: 25px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    color: #2c3e50;
    font-size: 1.4em;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5em;
    color: #95a5a6;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: color 0.3s ease, background 0.3s ease;
}

.modal-close:hover {
    color: #e74c3c;
    background: #f8f9fa;
}

.project-form {
    padding: 30px;
}

/* File Upload Area */
.file-upload-area {
    border: 2px dashed #e9ecef;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: #f8f9fa;
}

.file-upload-area:hover {
    border-color: #667eea;
    background: #f0f8ff;
}

.file-upload-area.dragover {
    border-color: #667eea;
    background: #e6f3ff;
    transform: scale(1.02);
}

.file-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
    color: #667eea;
}

.upload-text {
    color: #2c3e50;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.upload-subtext {
    color: #7f8c8d;
    font-size: 0.9em;
}

.file-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #e8f5e8;
    border: 1px solid #d4edda;
    border-radius: 6px;
    margin-top: 10px;
}

.file-name {
    font-weight: 500;
    color: #155724;
}

.file-size {
    font-size: 0.9em;
    color: #6c757d;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
}

/* Messages */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    animation: slideIn 0.3s ease;
}

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

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

.message-icon {
    font-weight: bold;
    font-size: 1.1em;
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-card {
        padding: 30px 25px;
        margin: 10px;
    }

    .auth-header h1 {
        font-size: 1.8em;
    }

    .landing-container {
        border-radius: 0;
    }

    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .landing-header {
        padding: 20px;
    }

    .landing-main {
        padding: 30px 20px;
    }

    .projects-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 10px;
        max-width: calc(100% - 20px);
    }

    .project-form {
        padding: 20px;
    }

    .modal-header {
        padding: 20px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 25px 20px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .landing-header .logo {
        flex-direction: column;
        gap: 10px;
    }

    .user-menu {
        flex-direction: column;
        gap: 10px;
    }

    .file-upload-area {
        padding: 30px 15px;
    }

    .upload-icon {
        font-size: 2em;
    }
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #667eea;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

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

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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