/* Common Styles for LMS App Prototype */

:root {
    --primary-color: #007AFF;
    --secondary-color: #5856D6;
    --success-color: #34C759;
    --warning-color: #FF9500;
    --danger-color: #FF3B30;
    --background: #F2F2F7;
    --card-background: #FFFFFF;
    --text-primary: #000000;
    --text-secondary: #8E8E93;
    --border-color: #E5E5EA;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* iPhone 16 Status Bar */
.status-bar {
    height: 54px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    font-size: 15px;
    font-weight: 600;
    border-bottom: 0.5px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.status-time {
    flex: 1;
}

.status-notch {
    width: 130px;
    height: 30px;
    background: #000;
    border-radius: 0 0 20px 20px;
}

.status-icons {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    align-items: center;
}

.status-icons i {
    font-size: 14px;
}

/* App Header */
.app-header {
    padding: 64px 20px 16px;
    background: var(--card-background);
}

.app-header h1 {
    font-size: 34px;
    font-weight: 700;
    margin-bottom: 8px;
}

.app-header .subtitle {
    color: var(--text-secondary);
    font-size: 17px;
}

/* Content Area */
.content {
    padding: 20px;
    padding-bottom: 100px;
    min-height: 100vh;
}

/* Cards */
.card {
    background: var(--card-background);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
}

.card-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 4px;
}

.card-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Progress Bar */
.progress-container {
    width: 100%;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 600;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: #0051D5;
    transform: scale(1.02);
}

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

/* Tab Bar */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 83px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-top: 0.5px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    padding: 8px 0 20px;
    z-index: 100;
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.tab-item.active {
    color: var(--primary-color);
}

.tab-item i {
    font-size: 24px;
}

.tab-item span {
    font-size: 10px;
    font-weight: 500;
}

/* List Items */
.list-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 0.5px solid var(--border-color);
}

.list-item:last-child {
    border-bottom: none;
}

.list-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 20px;
    color: white;
}

.list-content {
    flex: 1;
}

.list-title {
    font-size: 17px;
    font-weight: 500;
    margin-bottom: 2px;
}

.list-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: rgba(52, 199, 89, 0.1);
    color: var(--success-color);
}

.badge-warning {
    background: rgba(255, 149, 0, 0.1);
    color: var(--warning-color);
}

.badge-danger {
    background: rgba(255, 59, 48, 0.1);
    color: var(--danger-color);
}

/* Avatar */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-large {
    width: 80px;
    height: 80px;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 16px 0;
}

.stat-item {
    text-align: center;
    padding: 16px;
    background: var(--card-background);
    border-radius: 12px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Video Player */
.video-player {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.video-player img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s;
}

.play-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

/* Search Bar */
.search-bar {
    display: flex;
    align-items: center;
    background: var(--background);
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 16px;
}

.search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 17px;
    outline: none;
    padding-left: 8px;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 24px 0 12px;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
}

.section-action {
    color: var(--primary-color);
    font-size: 17px;
    text-decoration: none;
}

/* Loading Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
