/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --danger-color: #ff6b6b;
    --success-color: #51cf66;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: var(--light-bg);
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation Bar */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-item {
    margin: 0;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--primary-color);
}

.signup-btn {
    background: var(--primary-color);
    color: white !important;
    padding: 0.5rem 1.5rem;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.signup-btn:hover {
    background: var(--secondary-color);
    color: white;
}

.logout-btn {
    background: var(--danger-color);
    color: white !important;
    padding: 0.5rem 1.5rem;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.logout-btn:hover {
    background: #ff5252;
    color: white;
}

/* Messages Container */
.messages-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.alert {
    padding: 15px 20px;
    margin-bottom: 15px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s ease;
}

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

.alert-error {
    background-color: #ffe0e0;
    color: #d32f2f;
    border-left: 4px solid var(--danger-color);
}

.alert-success {
    background-color: #e8f5e9;
    color: #388e3c;
    border-left: 4px solid var(--success-color);
}

.alert-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: inherit;
}

.alert-close:hover {
    opacity: 0.7;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 80px - 200px);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: var(--border-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background: #bdbdbd;
}

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

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

.btn-block {
    display: block;
    width: 100%;
}

/* Forms */
.form-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 20px;
}

.form-wrapper {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.form-wrapper h1 {
    color: var(--text-color);
    margin-bottom: 10px;
    font-size: 2rem;
}

.form-subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.form {
    display: flex;
    flex-direction: column;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #999;
    font-size: 0.85rem;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
}

.form-footer p {
    color: #666;
}

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

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

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 10px;
    margin-bottom: 40px;
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.hero-section p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-buttons .btn {
    padding: 12px 30px;
    font-size: 1.05rem;
}

.hero-content.logged-in {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
}

.hero-content.logged-in h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

/* Features Section */
.features-section {
    margin: 40px 0;
}

.features-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--text-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

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

.feature-card p {
    color: #666;
}

/* Tech Stack Section */
.tech-stack-section {
    background: white;
    padding: 40px 20px;
    border-radius: 10px;
    margin: 40px 0;
}

.tech-stack-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--text-color);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.tech-item {
    background: var(--light-bg);
    padding: 20px;
    border-radius: 5px;
    border-left: 4px solid var(--primary-color);
}

.tech-item strong {
    color: var(--primary-color);
}

/* Footer */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
}

.footer-content p {
    margin: 5px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }

    .nav-menu {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        width: 100%;
    }

    .nav-link {
        display: block;
        padding: 8px;
    }

    .form-wrapper {
        padding: 30px 20px;
    }

    .hero-section {
        padding: 40px 20px;
    }

    .hero-section h1 {
        font-size: 1.8rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

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

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

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 1.5rem;
    }

    .form-wrapper h1 {
        font-size: 1.5rem;
    }

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.95rem;
    }

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

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.p-1 {
    padding: 1rem;
}

.p-2 {
    padding: 2rem;
}
