/* Bachelor League Task System - OSRS Theme Mobile-First CSS */

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

/* Pagination Styles */
.pagination-container {
    margin-top: 20px;
}

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #b09a6b;
    border-radius: 8px;
    padding: 15px;
    font-family: "ibm-plex-sans", sans-serif;
}

.pagination-btn {
    background-color: #8b7355;
    color: #fff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    font-family: "ibm-plex-sans", sans-serif;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.pagination-btn:hover {
    background-color: #6b5b47;
}

.pagination-info {
    color: #333;
    font-family: "matrix-ii", serif;
    font-weight: bold;
    text-align: center;
}

@media (max-width: 480px) {
    .pagination {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .pagination-btn {
        width: 100%;
        max-width: 120px;
    }
}

body {
    font-family: "matrix-ii", serif;
    line-height: 1.4;
    color: #333;
    background-color: #000;
    background-image: url('../assets/osrs_bg.jpg');
    background-repeat: repeat-y;
    background-position: center top;
    background-size: auto;
    min-height: 100vh;
}

.page-wrapper {
    max-width: 400px;
    margin: 0 auto;
    min-height: 100vh;
}

/* Header */
.header {
    text-align: center;
    padding: 20px 15px;
}

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

.logo {
    max-width: 200px;
    height: auto;
}

.nav-menu {
    display: flex;
    gap: 20px;
    font-family: "matrix-ii", serif;
}

.nav-link {
    color: #d4af37;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

/* Main Content */
.main-content {
    padding: 0 15px 20px 15px;
}

.content-container {
    background-color: #b09a6b;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

/* Search Section */
.search-section {
    margin-bottom: 20px;
}

.search-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #8b7355;
    border-radius: 4px;
    font-family: "ibm-plex-sans", sans-serif;
    font-size: 14px;
    background-color: #fff;
}

.search-input:focus {
    outline: none;
    border-color: #6b5b47;
}

.search-button {
    padding: 8px 16px;
    background-color: #8b7355;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-family: "ibm-plex-sans", sans-serif;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-button:hover {
    background-color: #6b5b47;
}

/* Task Sections */
.task-section {
    margin-bottom: 20px;
}

.section-header {
    background-color: #b09a6b;
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
}

.section-header h2 {
    font-family: "matrix-ii", serif;
    font-size: 18px;
    color: #333;
    margin: 0;
}

/* Task Table */
.task-table {
    background-color: #b09a6b;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.task-table table {
    width: 100%;
    border-collapse: collapse;
}

.task-row {
    border-bottom: 1px solid #8b7355;
}

.task-row.completed {
    background-color: #92a082;
}

.task-row.incomplete {
    background-color: #aa916d;
}

.task-row:last-child {
    border-bottom: none;
}

.task-cell {
    padding: 12px 15px;
    vertical-align: middle;
}

.task-checkbox {
    width: 20px;
    height: 20px;
}

.task-id {
    font-family: "matrix-ii", serif;
    font-weight: bold;
    color: #333;
    text-align: center;
    padding: 12px 10px;
}

.task-name {
    font-family: "matrix-ii", serif;
    color: #333;
    font-size: 14px;
}

/* Timeline Styles */
.timeline-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.timeline-item {
    background-color: #b09a6b;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.timeline-photo {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 6px;
    cursor: pointer;
}

.timeline-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.timeline-photo img:hover {
    transform: scale(1.02);
}

.timeline-content {
    display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: flex-start;
}

.timeline-points {
    font-family: "matrix-ii", serif;
    font-weight: bold;
    font-size: 24px;
    color: #296b24;
}

.timeline-task {
    font-family: "matrix-ii", serif;
    font-size: 16px;
    color: #333;
    font-weight: bold;
}

.timeline-metadata {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.timeline-datetime {
    font-family: "ibm-plex-sans", sans-serif;
    font-size: 12px;
    color: #555;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    cursor: pointer;
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    max-width: 90%;
    max-height: 90%;
    top: 50%;
    transform: translateY(-50%);
}

.modal-content img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.close {
    position: absolute;
    top: 10px;
    right: 25px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    opacity: 0.7;
}

/* User Profile Styles */
.container {
    max-width: 400px;
    margin: 0 auto;
    padding: 0 15px 20px 15px;
}

.user-header {
    background-color: #b09a6b;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.user-header h1 {
    font-family: "matrix-ii", serif;
    font-size: 24px;
    color: #333;
    margin-bottom: 15px;
}

.user-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 15px;
}

.user-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-family: "matrix-ii", serif;
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.stat-label {
    font-family: "ibm-plex-sans", sans-serif;
    font-size: 12px;
    color: #555;
}

.user-meta {
    font-family: "ibm-plex-sans", sans-serif;
    font-size: 14px;
    color: #555;
}

.user-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section {
    background-color: #b09a6b;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.section-header {
    background-color: #b09a6b;
    padding: 15px 20px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.section-header:hover {
    background-color: #a08a5b;
}

.section-header h2 {
    font-family: "matrix-ii", serif;
    font-size: 18px;
    color: #333;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toggle-icon {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.toggle-icon.collapsed {
    transform: rotate(-90deg);
}

.section-content {
    padding: 0 20px 20px 20px;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
}

.section-content.collapsed {
    max-height: 0;
    padding: 0 20px;
    opacity: 0;
}

.task-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.task-card {
    background-color: #aa916d;
    border-radius: 6px;
    padding: 15px;
    display: flex;
    gap: 15px;
}

.task-photo-cell {
    width: 60px;
    text-align: center;
}

.task-photo-thumbnail {
    width: 40px;
    height: 40px;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    margin: 0 auto;
    border: 2px solid #8b7355;
}

.task-photo-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.task-photo-thumbnail img:hover {
    transform: scale(1.1);
}

.task-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.task-info h3 {
    font-family: "matrix-ii", serif;
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
}

.task-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-points {
    font-family: "matrix-ii", serif;
    font-weight: bold;
    color: #333;
    background-color: #8b7355;
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.task-date {
    font-family: "ibm-plex-sans", sans-serif;
    font-size: 12px;
    color: #555;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.task-category {
    background-color: #aa916d;
    border-radius: 6px;
    padding: 15px;
}

.task-category h3 {
    font-family: "matrix-ii", serif;
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
}

.task-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: #8b7355;
    border-radius: 4px;
}

.task-title {
    font-family: "matrix-ii", serif;
    color: #fff;
    font-size: 14px;
}

.task-item .task-points {
    background-color: #6b5b47;
}

.empty-state {
    text-align: center;
    padding: 20px;
    font-family: "ibm-plex-sans", sans-serif;
    color: #555;
    font-style: italic;
}

/* Desktop Styles */
@media (min-width: 768px) {
    .page-wrapper {
        max-width: 500px;
    }
    
    .container {
        max-width: 500px;
    }
    
    .logo {
        max-width: 250px;
    }
    
    .nav-menu {
        gap: 30px;
    }
    
    .nav-link {
        font-size: 18px;
    }
    
    .user-header h1 {
        font-size: 28px;
    }
    
    .task-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .task-photo {
        width: 100px;
        height: 100px;
    }
}
