* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
.navbar {
    background: #2c3e50;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo h1 {
    color: #ecf0f1;
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #3498db;
}

.admin-btn {
    background: #e74c3c;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background 0.3s;
}

.admin-btn:hover {
    background: #c0392b;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #ecf0f1;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-top: 70px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-button {
    background: #e74c3c;
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.cta-button:hover {
    background: #c0392b;
}

/* Projects Section */
.projects {
    padding: 5rem 0;
    background: #f8f9fa;
}

.projects h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-image {
    height: 200px;
    background: linear-gradient(45deg, #3498db, #2ecc71);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.project-info p {
    color: #7f8c8d;
    margin-bottom: 1rem;
}

.project-link {
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
}

/* About Section */
.about {
    padding: 5rem 0;
    text-align: center;
}

.about h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.about p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    color: #7f8c8d;
}

/* Contact Section */
.contact {
    padding: 5rem 0;
    background: #2c3e50;
    color: white;
    text-align: center;
}

.contact h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.contact-info p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.social-links a {
    color: white;
    font-size: 2rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #3498db;
}

/* Footer */
footer {
    background: #34495e;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: #7f8c8d;
}

.close:hover {
    color: #2c3e50;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ecf0f1;
    border-radius: 5px;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
}

.modal-content button {
    width: 100%;
    background: #3498db;
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.modal-content button:hover {
    background: #2980b9;
}

/* Admin Panel Styles */
.admin-panel {
    display: none;
    background: #f8f9fa;
    min-height: 100vh;
    padding: 2rem 0;
}

.admin-header {
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.admin-header h1 {
    text-align: center;
}

.admin-controls {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.admin-section {
    background: white;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.admin-section h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
    margin-right: 1rem;
    margin-bottom: 1rem;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-success {
    background: #2ecc71;
    color: white;
}

.btn-success:hover {
    background: #27ae60;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.project-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.project-form input,
.project-form textarea {
    padding: 0.8rem;
    border: 2px solid #ecf0f1;
    border-radius: 5px;
    font-size: 1rem;
}

.project-form textarea {
    grid-column: 1 / -1;
    min-height: 100px;
}

.project-form input:focus,
.project-form textarea:focus {
    outline: none;
    border-color: #3498db;
}

/* Login Page Styles */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.login-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
}

.login-form h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.login-form p {
    color: #7f8c8d;
    margin-bottom: 2rem;
}

.back-link {
    display: inline-block;
    margin-top: 1rem;
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.back-link:hover {
    opacity: 1;
}

.admin-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 2px solid white;
    border-radius: 5px;
    transition: all 0.3s;
}

.nav-link:hover {
    background: white;
    color: #2c3e50;
}

#adminPanel {
    display: none;
}

/* Registration and Login Styles */
.register-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.register-container {
    width: 100%;
    max-width: 450px;
    padding: 2rem;
}

.register-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
}

.register-form h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.register-form p {
    color: #7f8c8d;
    margin-bottom: 2rem;
}

.admin-badge {
    background: #f39c12;
    color: white;
    padding: 0.8rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    animation: pulse 2s infinite;
}

.admin-badge i {
    margin-right: 0.5rem;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

.password-strength {
    font-size: 0.8rem;
    margin-top: 0.3rem;
}

.avatar-preview {
    font-size: 2rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    border: 2px dashed #ecf0f1;
    border-radius: 5px;
    display: inline-block;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.form-links {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.form-links a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.form-links a:hover {
    opacity: 1;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #7f8c8d;
    background: none;
    border: none;
    padding: 5px;
}

.form-group {
    position: relative;
}

/* Admin Panel Tabs */
.admin-tabs {
    display: flex;
    background: white;
    border-radius: 10px;
    margin-bottom: 2rem;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.tab-btn:hover {
    background: #ecf0f1;
}

.tab-btn.active {
    background: #3498db;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* User Management Styles */
.user-item {
    background: white;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    font-size: 2rem;
    background: #ecf0f1;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-details h4 {
    margin: 0 0 0.3rem 0;
    color: #2c3e50;
}

.user-details p {
    margin: 0 0 0.3rem 0;
    color: #7f8c8d;
}

.user-details small {
    color: #95a5a6;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.role-select {
    padding: 0.5rem;
    border: 2px solid #ecf0f1;
    border-radius: 5px;
    background: white;
}

.last-admin {
    color: #e74c3c;
    font-style: italic;
    font-size: 0.9rem;
}

/* Project Item Styles */
.project-item {
    background: white;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.project-info h4 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
}

.project-info p {
    margin: 0 0 0.5rem 0;
    color: #7f8c8d;
}

.project-info small {
    color: #95a5a6;
    font-size: 0.8rem;
}

.project-actions {
    display: flex;
    gap: 0.5rem;
}

/* User Info in Admin Header */
.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-info span {
    color: white;
}

#userAvatar {
    font-size: 1.5rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Terms Modal Styles */
.terms-content {
    max-height: 400px;
    overflow-y: auto;
    text-align: left;
    margin: 1rem 0;
}

.terms-content h3 {
    color: #2c3e50;
    margin: 1.5rem 0 0.5rem 0;
}

.terms-content p {
    color: #7f8c8d;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: #2c3e50;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-form {
        grid-template-columns: 1fr;
    }
}
