/* ===== Kavithuli - Tamil Short Poems ===== */

/* Feed layout */
.feed-container {
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
}

.feed-header {
    text-align: center;
    margin-bottom: 2rem;
}

.feed-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.feed-header p {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

/* Feed cards (LinkedIn-style) */
.feed {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.poem-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow var(--transition-normal);
}

.poem-card:hover {
    box-shadow: var(--shadow-lg);
}

.poem-card-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
}



.avatar {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.poem-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.poem-author {
    font-weight: 600;
    color: var(--gray-900);
}

.poem-date {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.poem-card-body img {
    width: 100%;
    display: block;
    background: var(--gray-100);
}

/* Generated poem cards (rendered as HTML so the browser shapes Tamil text) */
.poem-generated {
    padding: 3rem 2.25rem;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.poem-generated .poem-text {
    font-size: 1.6rem;
    line-height: 2.4rem;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: 'Latha', 'Nirmala UI', 'Noto Sans Tamil', 'Tamil Sangam MN',
        -apple-system, BlinkMacSystemFont, sans-serif;
}

.poem-generated .poem-signature {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid currentColor;
    font-size: 1.1rem;
    opacity: 0.85;
}

/* Card themes */
.theme-sand {
    background: #f5c57a;
    color: #212121;
}

.theme-sky {
    background: #bfdbfe;
    color: #1e3a8a;
}

.theme-rose {
    background: #fbcfe8;
    color: #831843;
}

.theme-mint {
    background: #bbf7d0;
    color: #166534;
}

.theme-charcoal {
    background: #1f2937;
    color: #f3f4f6;
}

.poem-caption {
    padding: 0.75rem 1.25rem;
    color: var(--gray-700);
    font-size: 0.95rem;
    white-space: pre-wrap;
}

.poem-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--gray-100);
}

.poem-tag {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-600);
    background: var(--primary-50);
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-full);
    font-weight: 600;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--gray-500);
}

.empty-state p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* Create page */
.create-container {
    max-width: 560px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
}

.create-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    text-align: center;
}

.create-subtitle {
    text-align: center;
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: var(--gray-100);
    padding: 0.35rem;
    border-radius: var(--radius-lg);
}

.tab-btn {
    flex: 1;
    padding: 0.65rem 1rem;
    border: none;
    background: transparent;
    color: var(--gray-600);
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.tab-btn.active {
    background: #fff;
    color: var(--primary-600);
    box-shadow: var(--shadow-sm);
}

.tab-panel {
    display: none;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.tab-panel.active {
    display: block;
}

.tab-panel label {
    margin-top: 1rem;
}

.tab-panel label:first-child {
    margin-top: 0;
}

.tab-panel button[type="submit"] {
    margin-top: 1.5rem;
}

/* Responsive */
@media (max-width: 480px) {
    .feed-header h1 {
        font-size: 2rem;
    }
}

/* ===== Delete confirmation modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 100;
    animation: fadeIn 0.2s ease-out;
}

.modal-overlay[hidden] {
    display: none;
}

.modal {
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    padding: 1.75rem;
    max-width: 26rem;
    width: 100%;
    animation: zoomIn 0.2s ease-out;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.modal-message {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.modal-actions form {
    margin: 0;
    width: auto;
}
