/* Flow Family Dance - Simple Mobile Web App */

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

:root {
    --primary: #7c3aed;
    --secondary: #ec4899;
    --dark: #1f2937;
    --gray: #6b7280;
    --light: #f3f4f6;
    --white: #ffffff;
    --radius: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--white);
    color: var(--dark);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Screens */
.screen {
    display: none;
    min-height: 100vh;
    width: 100%;
    position: relative;
    background: var(--white);
}

.screen.active {
    display: block;
}


/* Login Screen */
#login {
    padding: 40px 20px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h2 {
    font-size: 28px;
    margin-bottom: 8px;
}

.header p {
    color: var(--gray);
}

.form-container {
    max-width: 400px;
    margin: 0 auto;
}

.role-toggle {
    display: flex;
    background: var(--light);
    border-radius: var(--radius);
    padding: 4px;
    margin-bottom: 30px;
}

.role-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.3s;
}

.role-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.input-group input {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--light);
    border-radius: var(--radius);
    font-size: 16px;
    transition: border-color 0.3s;
}

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

.btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

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

.demo-info {
    margin-top: 30px;
    padding: 20px;
    background: var(--light);
    border-radius: var(--radius);
    text-align: center;
}

.demo-info p {
    font-weight: 600;
    margin-bottom: 10px;
}

/* App Header */
.app-header {
    padding: 20px;
    background: white;
    border-bottom: 1px solid var(--light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left h3 {
    font-size: 20px;
    margin-bottom: 4px;
}

.header-left p {
    color: var(--gray);
    font-size: 14px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--light);
    border-radius: 10px;
    font-size: 20px;
    cursor: pointer;
}

.lang-btn {
    padding: 8px 12px;
    border: 2px solid var(--primary);
    background: white;
    color: var(--primary);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.back-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    font-size: 24px;
    cursor: pointer;
}

.back-btn.white {
    color: white;
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
}

/* Content */
.content {
    padding: 20px;
    padding-bottom: 80px;
}

/* Stats */
.stats-container {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.stat-card {
    flex: 1;
    background: var(--light);
    padding: 15px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-icon {
    font-size: 24px;
}

.stat-info h4 {
    font-size: 18px;
    margin-bottom: 2px;
}

.stat-info small {
    font-size: 11px;
    color: var(--gray);
}

/* Continue Card */
.continue-card {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 15px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

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

.continue-card img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.continue-info {
    flex: 1;
}

.continue-info h4 {
    font-size: 16px;
    margin-bottom: 4px;
}

.continue-info p {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.progress-bar {
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
}

.progress {
    height: 100%;
    background: white;
    border-radius: 2px;
}

.play-btn {
    width: 50px;
    height: 50px;
    border: none;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

/* Sections */
.section {
    margin-bottom: 30px;
}

.section h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-header a {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

/* Categories */
.category-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.category-list::-webkit-scrollbar {
    display: none;
}

.category-pill {
    padding: 10px 16px;
    border: 2px solid var(--light);
    background: white;
    border-radius: 25px;
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
}

.category-pill.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Class Grid */
.class-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.class-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
}

.class-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.class-info {
    padding: 12px;
}

.class-info h4 {
    font-size: 14px;
    margin-bottom: 4px;
}

.class-info p {
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 8px;
}

.class-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.class-meta strong {
    color: var(--primary);
}

/* Browse Screen */
.search-bar {
    margin-bottom: 20px;
}

.search-bar input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--light);
    border-radius: var(--radius);
    font-size: 16px;
}

.filter-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
    padding-bottom: 5px;
}

.filter-chips::-webkit-scrollbar {
    display: none;
}

.chip {
    padding: 8px 16px;
    border: 1px solid var(--light);
    background: white;
    border-radius: 20px;
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
}

.chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

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

.class-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    cursor: pointer;
}

.class-item img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
}

.class-details {
    flex: 1;
}

.class-details h4 {
    font-size: 16px;
    margin-bottom: 4px;
}

.class-details p {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 8px;
}

/* Class Detail */
.class-hero {
    position: relative;
    height: 250px;
}

.class-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Video Container */
.video-container {
    position: relative;
    width: 100%;
    height: 250px;
    background: #000;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: rgba(0,0,0,0.3);
}

.play-btn-large {
    padding: 15px 30px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.play-btn-large:hover {
    transform: scale(1.05);
    background: white;
}

.fullscreen-btn {
    padding: 12px 25px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.fullscreen-btn:hover {
    transform: scale(1.05);
    background: var(--secondary);
}

.class-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 20px;
}

.class-header h2 {
    font-size: 24px;
    flex: 1;
}

.price-tag {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
}

.teacher-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--light);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.teacher-info img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.teacher-info > div {
    flex: 1;
}

.teacher-info h4 {
    font-size: 16px;
    margin-bottom: 2px;
}

.teacher-info p {
    font-size: 14px;
    color: var(--gray);
}

.follow-btn {
    padding: 8px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.class-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 30px;
}

.class-stats .stat {
    text-align: center;
    padding: 10px;
    background: var(--light);
    border-radius: 8px;
}

.class-stats strong {
    display: block;
    font-size: 16px;
    margin-bottom: 4px;
}

.class-stats small {
    color: var(--gray);
    font-size: 12px;
}

.learn-list {
    list-style: none;
    padding: 0;
}

.learn-list li {
    padding: 10px 0;
    font-size: 14px;
}

.bottom-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: white;
    border-top: 1px solid var(--light);
    display: flex;
    gap: 10px;
}

.bottom-actions .btn {
    flex: 1;
}

/* Teacher Dashboard */
.earnings-card {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 20px;
    border-radius: var(--radius);
    color: white;
    margin-bottom: 20px;
}

.earnings-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.earnings-card h2 {
    font-size: 32px;
    margin: 8px 0;
}

.earnings-card small {
    opacity: 0.9;
}

.trend {
    font-size: 14px;
    opacity: 0.9;
}

.btn-small {
    padding: 8px 16px;
    background: white;
    color: var(--primary);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.stat-box {
    background: var(--light);
    padding: 20px;
    border-radius: var(--radius);
    text-align: center;
}

.stat-box .stat-icon {
    font-size: 28px;
    margin-bottom: 8px;
    display: block;
}

.stat-box h4 {
    font-size: 24px;
    margin-bottom: 4px;
}

.stat-box small {
    color: var(--gray);
    font-size: 12px;
}

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

.sale-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sale-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.sale-info {
    flex: 1;
}

.sale-info h4 {
    font-size: 14px;
    margin-bottom: 2px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--light);
}

.tab {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--gray);
    font-weight: 500;
    cursor: pointer;
}

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

/* Progress Bar */
.progress-bar {
    height: 6px;
    background: var(--light);
    border-radius: 3px;
    overflow: hidden;
    margin: 8px 0;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Notifications */
.notification-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.notification-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: var(--light);
    border-radius: var(--radius);
    margin-bottom: 10px;
}

.notification-icon {
    font-size: 24px;
}

.notification-content {
    flex: 1;
}

.notification-content h4 {
    font-size: 14px;
    margin-bottom: 4px;
}

.notification-content p {
    color: var(--gray);
    font-size: 13px;
    margin-bottom: 4px;
}

.notification-content small {
    color: var(--gray);
    font-size: 11px;
}

/* Teacher Class Item */
.teacher-class-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: var(--light);
    border-radius: var(--radius);
    margin-bottom: 10px;
}

.class-info {
    flex: 1;
}

.class-stats-inline {
    display: flex;
    gap: 12px;
    margin-top: 6px;
    font-size: 13px;
    color: var(--gray);
}

/* Earnings */
.earnings-list {
    background: var(--light);
    border-radius: var(--radius);
    padding: 15px;
}

.earnings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

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

.payout-list {
    background: var(--light);
    border-radius: var(--radius);
    padding: 15px;
}

.payout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

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

/* Upload Form */
.upload-form {
    padding-bottom: 20px;
}

.upload-video-area {
    background: var(--light);
    border: 2px dashed var(--gray);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    margin-bottom: 20px;
}

.upload-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

.upload-video-area h4 {
    margin-bottom: 5px;
}

.upload-video-area p {
    color: var(--gray);
    font-size: 14px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.form-actions button {
    flex: 1;
}

/* Input Group */
.input-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 500;
}

.input-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--light);
    border-radius: 8px;
    font-size: 16px;
    resize: vertical;
}

.input-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--light);
    border-radius: 8px;
    font-size: 16px;
    background: white;
}

.sale-info p {
    font-size: 12px;
    color: var(--gray);
}

.sale-amount {
    text-align: right;
}

.sale-amount strong {
    display: block;
    color: #10b981;
    font-size: 16px;
    margin-bottom: 2px;
}

.sale-amount small {
    font-size: 12px;
    color: var(--gray);
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.action-btn {
    padding: 20px 10px;
    background: white;
    border: 2px solid var(--light);
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
}

.action-btn span {
    display: block;
    font-size: 24px;
    margin-bottom: 5px;
}

.action-btn small {
    font-size: 12px;
    color: var(--gray);
}

/* Profile */
.profile-header {
    text-align: center;
    padding: 30px 0;
}

.profile-pic {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 15px;
}

.profile-header h2 {
    font-size: 24px;
    margin-bottom: 5px;
}

.profile-header p {
    color: var(--gray);
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background: var(--light);
    border-radius: var(--radius);
    margin-bottom: 30px;
}

.profile-stats .stat {
    text-align: center;
}

.profile-stats strong {
    display: block;
    font-size: 20px;
    margin-bottom: 4px;
}

.profile-stats small {
    color: var(--gray);
    font-size: 12px;
}

.menu-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    border: 1px solid var(--light);
    border-radius: var(--radius);
    font-size: 16px;
    cursor: pointer;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: white;
    border-top: 1px solid var(--light);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: none;
    background: none;
    color: var(--gray);
    cursor: pointer;
}

.nav-item span {
    font-size: 24px;
}

.nav-item small {
    font-size: 11px;
}

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

.nav-item.upload {
    background: var(--primary);
    color: white;
    border-radius: 12px;
    font-size: 22px;
    font-weight: 600;
}

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

/* Responsive */
@media (min-width: 768px) {
    body {
        display: flex;
        justify-content: center;
        align-items: center;
        background: var(--light);
    }
    
    .screen {
        max-width: 414px;
        box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    }
}