@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Vazirmatn, sans-serif;
    direction: rtl;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Glassy card effect */
.glass-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    padding: 30px;
    margin-bottom: 20px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.header h1 {
    color: white;
    font-size: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-family: Vazirmatn, sans-serif;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Login form */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-form {
    width: 100%;
    max-width: 400px;
}

.login-form h2 {
    color: white;
    text-align: center;
    margin-bottom: 30px;
}

/* Input form */
.input-section {
    margin-bottom: 30px;
}

.text-input-container {
    position: relative;
    margin-bottom: 20px;
}

#contentInput {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.9);
    font-family: Vazirmatn, sans-serif;
    font-size: 1rem;
    resize: vertical;
    transition: all 0.3s ease;
}

#contentInput:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: white;
}

.mic-button {
    position: absolute;
    left: 15px;
    bottom: 15px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.mic-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.mic-button.recording {
    background: #ef4444;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 25px rgba(239, 68, 68, 0.6);
    }
}

/* Dropdowns */
.dropdowns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.dropdown-group {
    display: flex;
    flex-direction: column;
}

.dropdown-group label {
    color: white;
    margin-bottom: 8px;
    font-weight: 500;
}

select, input[type="text"], input[type="password"] {
    padding: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    font-family: Vazirmatn, sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

select:focus, input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: white;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-family: Vazirmatn, sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-full {
    width: 100%;
}

/* Filters */
.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

/* List items */
.log-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.log-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
}

.log-item:hover {
    transform: translateX(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.log-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.log-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-subject {
    background: #dbeafe;
    color: #1e40af;
}

.badge-category {
    background: #fef3c7;
    color: #92400e;
}

.badge-type {
    background: #d1fae5;
    color: #065f46;
}

.log-date {
    color: #6b7280;
    font-size: 0.9rem;
    white-space: nowrap;
}

.log-content {
    color: #374151;
    line-height: 1.6;
    margin-top: 10px;
}

.log-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-small {
    padding: 6px 15px;
    font-size: 0.9rem;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination button {
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    font-family: Vazirmatn, sans-serif;
    transition: all 0.3s ease;
}

.pagination button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination span {
    color: white;
    font-weight: 500;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px;
    color: white;
}

.empty-state svg {
    width: 100px;
    height: 100px;
    margin-bottom: 20px;
    opacity: 0.7;
}

/* Alert messages */
.alert {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-error {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

.alert-success {
    background: rgba(16, 185, 129, 0.9);
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .glass-card {
        padding: 20px;
    }
    
    .dropdowns, .filters {
        grid-template-columns: 1fr;
    }
    
    .log-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .mic-button {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}

/* Loading spinner */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
