/* Instagram-like styles */
:root { 
    --card: #fff; 
    --muted: #667; 
    --ink: #262626; 
    --bg: #fafafa; 
    --radius: 16px; 
    --border: #dbdbdb;
    --primary: #667eea;
    --primary-dark: #764ba2;
    --instagram-gradient: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
    line-height: 1.6;
}

body.rtl {
    direction: rtl;
    text-align: right;
}

body:not(.rtl) {
    direction: ltr;
    text-align: left;
}

.modern-header {
    background: white;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.header-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 600;
    background: var(--instagram-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
}

.brand {
  background-image: url("/src/logo.png");
  background-repeat: no-repeat;
  background-size: contain;
}

.header-actions .btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    background: var(--instagram-gradient);
    color: white;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(198, 40, 144, 0.3);
}

.header-actions .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(198, 40, 144, 0.4);
}

.header-actions .btn:active {
    transform: translateY(-1px);
}

.feed-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 0 10px;
}

.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
}

.feed-header h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
}

.sort-options select {
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: white;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.sort-options select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

/* Language switcher - more visible and prominent */
.lang-switcher {
    display: flex;
    gap: 12px;
    align-items: center;
}

.lang-switcher button {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: 2px solid white;
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
    font-size: 1rem;
    min-width: 100px;
}

.lang-switcher button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.4);
}

.lang-switcher button.active {
    background: white;
    color: var(--primary-dark);
    border: 2px solid var(--primary);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Instagram card styles */
.ig-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 6px 20px rgba(0,0,0,.06);
    overflow: hidden;
    margin: 16px 0;
    border: 1px solid var(--border);
}

.ig-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
}

.ig-ava {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--instagram-gradient);
    color: white;
    display: grid;
    place-items: center;
    font-weight: 700;
}

.ig-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    flex: 1;
}

.ig-meta b {
    font-weight: 600;
    font-size: 0.95rem;
}

.ig-phone {
    color: var(--muted);
    font-size: 0.85rem;
    margin-top: 2px;
}

.ig-time {
    color: var(--muted);
    font-size: 0.8rem;
    margin-top: 2px;
}

.ig-dots {
    margin-inline-start: auto;
    background: transparent;
    border: 0;
    font-size: 20px;
    color: var(--muted);
    cursor: pointer;
}

.ig-media {
    position: relative;
    background: #f2f2f2;
    cursor: pointer;
}

.ig-media img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 1/1;
    object-fit: cover;
}

.ig-heart-burst {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 90px;
    color: #ff3355;
    opacity: 0;
    transform: scale(.6);
    pointer-events: none;
}

.ig-heart-burst.boom {
    animation: burst .6s ease forwards;
}

@keyframes burst {
    10% { opacity: .9; transform: scale(1) }
    100% { opacity: 0; transform: scale(1.3) }
}

.ig-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
}

.ig-like {
    background: transparent;
    border: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--ink);
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

.ig-like:hover {
    background: #f0f0f0;
}

.ig-like.active {
    color: #ff3355;
}

.ig-download {
    margin-inline-start: auto;
    text-decoration: none;
    font-size: 18px;
    color: var(--ink);
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

.ig-download:hover {
    background: #f0f0f0;
}

.ig-cap {
    padding: 0 14px 14px;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.95rem;
    line-height: 1.4;
}

.skeleton {
    background: linear-gradient(90deg,#eee,#f6f6f6,#eee);
    animation: s 1.1s linear infinite;
}

@keyframes s {
    0% { background-position: -100% 0 }
    100% { background-position: 200% 0 }
}

.skeleton-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin: 16px 0;
    border: 1px solid var(--border);
    height: 500px;
    animation: pulse 1.5s ease-in-out infinite alternate;
}

@keyframes pulse {
    from { background-color: #f0f0f0; }
    to { background-color: #e0e0e0; }
}

.loading {
    text-align: center;
    padding: 20px;
    color: var(--muted);
}

.hidden {
    display: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .feed-container {
        padding: 0 5px;
    }
    
    .header-content {
        padding: 15px 10px;
    }
    
    .feed-header {
        padding: 12px;
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .feed-header h2 {
        font-size: 1.2rem;
    }
    
    .sort-options {
        display: flex;
        justify-content: flex-end;
    }
    
    .header-actions .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    body:not(.rtl) .feed-header {
        align-items: stretch;
    }
    
    body:not(.rtl) .sort-options {
        justify-content: flex-start;
    }
    
    .ig-meta b {
        font-size: 0.9rem;
    }
    
    .ig-phone, .ig-time {
        font-size: 0.8rem;
    }
    
    /* Mobile language switcher */
    .lang-switcher {
        gap: 8px;
        justify-content: center;
    }
    
    .lang-switcher button {
        padding: 8px 16px;
        font-size: 0.9rem;
        min-width: 80px;
    }
}

/* Hide home link during closure period */
a[href="index.html"] {
  display: none !important;
}
