/* homecss.css */
:root {
    --bg-screen: #a3b18a; /* LCD Classic Green */
    --text-dark: #1b1b1b;
    --accent-red: #8b0000;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body { 
    background: #000; 
    margin: 0; 
    overflow: hidden; 
    font-family: 'Courier New', Courier, monospace; 
}

/* Mobile Frame Container */
.mobile-frame {
    width: 100%;
    max-width: 450px;
    height: 100vh;
    background: #222;
    margin: 0 auto;
    border: 8px solid #333;
    position: relative;
    display: flex;
    flex-direction: column;
}

.screen-content {
    background: var(--bg-screen);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: var(--text-dark);
}

/* Status Bar */
.status-bar {
    height: 30px;
    background: rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    font-size: 12px;
    font-weight: bold;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.batt-icon {
    width: 25px;
    height: 12px;
    border: 1px solid #000;
    display: inline-block;
    position: relative;
    margin-left: 5px;
}

#batt-level { height: 100%; background: #000; width: 0%; }

/* Viewport & Logic */
.viewport { flex-grow: 1; position: relative; }
.view { display: none; height: 100%; width: 100%; position: absolute; }
.view.active { display: block; animation: fadeIn 0.2s; }

/* Home Hero */
.home-hero {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0,0,0,0.02) 10px, rgba(0,0,0,0.02) 20px);
}

#big-clock { font-size: 70px; margin: 0; font-weight: 900; letter-spacing: -2px; }

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 25px 15px;
}

.menu-item { display: flex; flex-direction: column; align-items: center; font-size: 11px; font-weight: bold; }
.m-icon {
    width: 65px; height: 65px; border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; color: #fff; margin-bottom: 8px;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.2);
}

.orange { background: #d35400; }
.blue { background: #2980b9; }
.green { background: #27ae60; }
.purple { background: #8e44ad; }
.pink { background: #c0392b; }
.red { background: #2c3e50; }

/* App Styles */
.app-header { background: #000; color: var(--bg-screen); text-align: center; padding: 5px; font-weight: bold; }
.app-body { padding: 15px; height: calc(100% - 30px); }
.scroll { overflow-y: auto; }

/* Tech Cards */
.tech-card { border-bottom: 1px solid rgba(0,0,0,0.1); padding: 10px 0; cursor: pointer; }
.t-cat { font-size: 10px; font-weight: bold; text-decoration: underline; }
.t-title { font-size: 16px; font-weight: bold; }

.hidden-detail { display: none; background: var(--bg-screen); z-index: 10; }

/* Form */
.old-group { margin-bottom: 15px; }
.old-group label { display: block; font-weight: bold; font-size: 13px; }
.old-group input, .old-group textarea {
    width: 100%; border: 2px solid #000; background: rgba(255,255,255,0.2); padding: 8px;
}

.submit-retro {
    width: 100%; background: #000; color: var(--bg-screen); border: none; padding: 12px; font-weight: bold;
}

/* Soft Keys */
.soft-keys {
    height: 50px; background: rgba(0,0,0,0.05);
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 25px; border-top: 1px solid rgba(0,0,0,0.1);
}

.sk-btn { font-weight: 900; cursor: pointer; font-size: 14px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Walkman Reel Rotation */
.playing .reel { animation: spin 2s linear infinite; }
@keyframes spin { from {transform: rotate(0deg);} to {transform: rotate(360deg);} }


/* Project App Styles */
.project-list {
    display: flex;
    flex-direction: column;
    gap: 1px; /* ایجاد خط جدا کننده بین کارت‌ها */
    background: rgba(0,0,0,0.1);
}

.project-card {
    background: var(--bg-screen);
    border-bottom: 1px solid rgba(0,0,0,0.2);
}

.project-main {
    display: flex;
    align-items: center;
    padding: 12px 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.project-main:active {
    background: rgba(0,0,0,0.1);
}

.p-icon-box {
    font-size: 24px;
    margin-right: 15px;
    color: #2c3e50;
}

.p-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.p-name {
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
}

.p-tag {
    font-size: 10px;
    opacity: 0.7;
    font-weight: bold;
}

.p-arrow {
    font-size: 12px;
    opacity: 0.5;
}

/* Detail Animation */
.project-detail-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: rgba(0,0,0,0.05);
}

.p-inner-box {
    padding: 15px;
    font-size: 12px;
    line-height: 1.4;
    border-top: 1px dashed rgba(0,0,0,0.2);
}

.p-link-btn {
    display: inline-block;
    margin-top: 10px;
    background: #000;
    color: var(--bg-screen);
    padding: 5px 10px;
    text-decoration: none;
    font-weight: bold;
    font-size: 11px;
}

.home-wrapper {
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.widget {
    background: rgba(0, 0, 0, 0.08);
    border: 2px solid #000;
    border-radius: 12px;
    overflow: hidden;
}

.w-label {
    background: #000;
    color: var(--bg-screen);
    font-size: 10px;
    padding: 2px 8px;
    font-weight: bold;
}

/* Music Widget */
.music-widget { display: flex; flex-direction: column; cursor: pointer; }
.music-widget .w-content {
    display: flex;
    align-items: center;
    padding: 10px;
    gap: 15px;
}

.music-bars { display: flex; align-items: flex-end; gap: 2px; height: 20px; }
.music-bars span {
    width: 3px; background: #000; height: 5px;
    animation: bar-dance 1s infinite alternate;
    display: none; /* فقط موقع پخش نمایش داده شود */
}
.playing .music-bars span { display: block; }

@keyframes bar-dance {
    0% { height: 5px; } 100% { height: 20px; }
}

/* Gallery Widget */
.gallery-widget .w-content {
    height: 150px;
    position: relative;
    background: #000;
}

.slide-img {
    width: 100%; height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0; left: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide-img.active { opacity: 1; }