/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation Bar */
.navbar {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.8;
}

/* Messages */
.messages {
    max-width: 1200px;
    margin: 1rem auto;
    padding: 0 20px;
}

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

/* Main Content */
main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 4rem 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.3rem;
    opacity: 0.9;
}

/* Stats Section */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h2 {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: #666;
    font-size: 1.1rem;
}

/* Section */
.section {
    margin-bottom: 3rem;
}

.section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #333;
}

/* Cards Grid */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.no-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.card h3 {
    padding: 1rem;
    font-size: 1.3rem;
    color: #333;
}

.card p {
    padding: 0 1rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.card .role,
.card .city,
.card .year,
.card .period,
.card .date {
    font-size: 0.9rem;
    color: #888;
}

.card .years {
    font-size: 0.9rem;
    color: white;
}

.card .btn {
    margin: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: opacity 0.3s;
    font-size: 1rem;
}

.btn:hover {
    opacity: 0.9;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.btn-secondary {
    background: #6c757d;
}

.btn-warning {
    background: #ffc107;
    color: #333;
}

.btn-danger {
    background: #dc3545;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 1rem;
}

/* Timeline */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline-item {
    margin-bottom: 3rem;
    position: relative;
}

.timeline-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.period-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.period-header h2 {
    color: #667eea;
    margin: 0;
}

.years {
    background: #667eea;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
}

.timeline-content img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    margin: 1rem 0;
}

/* Detail Page */
.detail-page {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.detail-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #f4f4f4;
}

.detail-header h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    color: #666;
}

.detail-image {
    margin: 2rem 0;
}

.detail-image img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 10px;
}

.detail-content {
    line-height: 1.8;
    margin-bottom: 2rem;
}

.detail-content h2 {
    color: #667eea;
    margin: 2rem 0 1rem 0;
}

.detail-content p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 1rem;
}

.info-box {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin: 2rem 0;
}

.info-box h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

.info-box ul {
    list-style: none;
}

.info-box li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.info-box li:last-child {
    border-bottom: none;
}

.info-box a {
    color: #667eea;
    text-decoration: none;
}

.info-box a:hover {
    text-decoration: underline;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Related Section */
.related-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #f4f4f4;
}

.related-section h2 {
    color: #667eea;
    margin-bottom: 1.5rem;
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.tag {
    background: #667eea;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    transition: background 0.3s;
}

.tag:hover {
    background: #764ba2;
}

/* Forms */
.form-page,
.auth-page {
    max-width: 600px;
    margin: 0 auto;
}

.auth-box {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.auth-box h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.auth-box > p {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
}

.form {
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.error {
    color: #dc3545;
    font-size: 0.9rem;
    display: block;
    margin-top: 0.25rem;
}

.help-text {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.auth-link {
    text-align: center;
    margin-top: 1.5rem;
    color: #666;
}

.auth-link a {
    color: #667eea;
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

.warning-box {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 5px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.warning-box p {
    margin-bottom: 0.5rem;
}

/* Profile Page */
.profile-page {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.profile-page h1 {
    color: #667eea;
    margin-bottom: 2rem;
}

.profile-section {
    margin-top: 2rem;
}

.profile-section h2 {
    color: #333;
    margin-bottom: 1.5rem;
}

/* Footer */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

footer p {
    margin: 0;
}

/* Profile Header */
.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.profile-avatar {
    flex-shrink: 0;
}

.avatar-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: white;
    color: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
}

.profile-info h1 {
    margin-bottom: 0.5rem;
    color: white;
}

.profile-email,
.profile-joined,
.profile-contributions {
    margin: 0.3rem 0;
    opacity: 0.9;
}

/* Contribution Actions */
.contribution-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

/* Empty Message */
.empty-message {
    text-align: center;
    color: #999;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 10px;
}

/* Card Actions */
.card-actions {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .period-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .years {
        margin-top: 0.5rem;
    }
}