:root {
    --primary: #8b5cf6;
    --primary-light: #a78bfa;
    --secondary: #ec4899;
    --emerald: #10b981;
    --accent: #f59e0b;
    --bg: #0f172a;
    --card: rgba(30, 41, 59, 0.7);
    --text: #f8fafc;
    --muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --glass: rgba(255, 255, 255, 0.03);
    --surface: #020617;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: radial-gradient(circle at top right, #1e1b4b, #0f172a, #020617);
    color: var(--text);
    padding: 1.5rem;
    min-height: 100vh;
    background-attachment: fixed;
}

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

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    padding: 1.2rem 2rem;
    border-radius: 24px;
    background: var(--glass);
    border: 1px solid var(--border);
}

.logo-section h1 {
    font-size: 2rem;
    background: linear-gradient(135deg, #a78bfa 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.search-box {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.6rem 1.2rem;
    border-radius: 14px;
    display: flex;
    align-items: center;
    width: 280px;
}

.search-box input {
    background: transparent;
    border: none;
    color: white;
    margin-left: 10px;
    outline: none;
    width: 100%;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card);
    padding: 1.2rem 2rem;
    border-radius: 24px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
}

.stat-icon {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.2rem;
    opacity: 0.1;
}

/* Table */
.table-container {
    background: var(--card);
    border-radius: 24px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.gem-table {
    width: 100%;
    border-collapse: collapse;
}

.gem-table th {
    background: rgba(15, 23, 42, 0.8);
    padding: 1.2rem;
    text-align: left;
    color: var(--muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gem-table td {
    padding: 1.2rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

/* Description Styling */
.desc-container {
    max-width: 250px;
    line-height: 1.4;
    position: relative;
}

.read-more-btn {
    background: none;
    border: none;
    color: var(--primary-light);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0;
    margin-top: 4px;
    display: block;
}

.desc-full-hidden {
    display: none;
}

.desc-full-visible {
    display: block;
    font-size: 0.8rem;
    color: #cbd5e1;
    white-space: pre-wrap;
    margin-top: 5px;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px;
    border-radius: 8px;
}

.category-tag {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary-light);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.action-icon {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.2s;
}

.action-icon.edit {
    color: var(--primary-light);
}

.action-icon.delete {
    color: #ef4444;
}

.action-icon:hover {
    transform: scale(1.2);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(12px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--surface);
    width: 650px;
    padding: 2.5rem;
    border-radius: 32px;
    border: 1px solid var(--border);
}

.close-btn {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 2rem;
    cursor: pointer;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

label {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
    margin-bottom: 6px;
}

input,
textarea {
    width: 100%;
    padding: 0.9rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    color: white;
    border-radius: 12px;
    outline: none;
}

input:focus,
textarea:focus {
    border-color: var(--primary);
}

.btn {
    padding: 0.8rem 1.6rem;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #6d28d9 100%);
    color: white;
}

.btn-cloud-sync {
    background: linear-gradient(135deg, var(--emerald) 0%, #059669 100%);
    color: white;
}

.system-footer {
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--glass);
    border-radius: 20px;
    border: 1px solid var(--border);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}