:root {
    --bg-color: #020617;
    --text-color: #f8fafc;
    --card-bg: rgba(30, 41, 59, 0.6);
    --card-border: rgba(255, 255, 255, 0.05);
    --primary: #3b82f6;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    background-image: url('https://images.unsplash.com/photo-1462331940025-496dfbfc7564?q=80&w=2000&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.dashboard-container {
    min-height: 100vh;
    background: rgba(2, 6, 23, 0.3);
   /* backdrop-filter: blur(5px);*/
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.gear-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand h1 {
    margin: 0;
    font-size: 1.2rem;
}

.badge {
    background: rgba(234, 179, 8, 0.2);
    color: #eab308;
    padding: 0.2rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.7rem;
    border: 1px solid rgba(234, 179, 8, 0.4);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.limits {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: #cfd8e4;
}

.progress-bar {
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    width: 100px;
}

.progress {
    height: 100%;
    background: #ef4444;
    border-radius: 2px;
}

.user-profile {
    font-size: 0.9rem;
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    text-align: center;
}

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

.hero h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hero p {
    color: #cfd8e4;
    margin-bottom: 3rem;
}

/* Tabs UI */
.categories-tabs-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-bottom: 0px; /* Separado del rectángulo de enlaces */
    position: relative;
    z-index: 10;
    padding-right: 3rem;
}

.tab-btn {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    padding: 0.6rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.tab-btn:hover {
    background: rgba(40, 51, 70, 0.8);
    color: white;
}

.tab-btn.active {
    background: rgba(30, 41, 59, 0.95);
    color: white;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* We'll remove the special uncategorized-tab styling to make it look like other tabs */
/* .tab-btn.uncategorized-tab rules removed so it inherits standard .tab-btn */

.tab-btn.dragging {
    opacity: 0.5;
    border: 2px dashed #94a3b8;
}

.dashboard-container.edit-mode .draggable-category {
    cursor: grab;
}

.dashboard-container.edit-mode .draggable-category:active {
    cursor: grabbing;
}

/* Edit mode category actions */
.category-tab-actions {
    display: none;
    gap: 4px;
}

.dashboard-container.edit-mode .category-tab-actions {
    display: flex;
}

.dashboard-container.edit-mode .tab-btn {
    padding-right: 0.5rem;
}

.tab-action-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    border-radius: 4px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
}

.tab-action-btn:hover {
    color: white;
}

.tab-action-btn.delete:hover {
    color: #ef4444;
}

.add-category-tab {
    background: transparent;
    border: 1px dashed rgba(255,255,255,0.2);
    color: white;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.dashboard-container.edit-mode .add-category-tab {
    display: flex;
}

.add-category-tab:hover {
    background: rgba(255,255,255,0.05);
    color: white;
}

.links-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 1.5rem;
    border: 1px solid var(--card-border);
    min-height: 200px;
    margin-top: 15px; /* Adds gap between tabs and container */
}

.category-pane {
    display: none;
    width: 100%;
}

.category-pane.active {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.category-header-inline {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.shortcut-item {
    width: 140px;
    height: 140px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    transition: transform 0.2s, background 0.2s;
    position: relative;
}

.shortcut-item:hover {
    transform: translateY(-5px);
    background: rgba(30, 41, 59, 0.9);
}

.shortcut-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    display: none;
    gap: 5px;
}

.dashboard-container.edit-mode .shortcut-actions {
    display: flex;
}

.dashboard-container.edit-mode .link-trash-zone {
    display: flex !important;
}

.link-trash-zone * {
    pointer-events: none;
}

.link-trash-zone.drag-over {
    background-color: rgba(239, 68, 68, 0.2);
    transform: scale(1.05);
}

.shortcut-item.dragging {
    opacity: 0.5;
}


.dashboard-container.edit-mode .shortcut-item {
    animation: shake 0.5s infinite;
}

@keyframes shake {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(-1deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(1deg); }
    100% { transform: rotate(0deg); }
}

.action-btn {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.action-btn.delete-btn:hover {
    background: rgba(239, 68, 68, 0.8);
    color: white;
    border-color: rgba(239, 68, 68, 1);
}

.shortcut-icon {
    width: 48px;
    height: 48px;
    background: rgba(0,0,0,0.3);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.shortcut-icon img {
    width: 24px;
    height: 24px;
}

.shortcut-title {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    width: 90%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shortcut-domain {
    font-size: 0.7rem;
    color: #94a3b8;
}

.add-link-card {
    width: 140px;
    height: 140px;
    background: transparent;
    border: 1px dashed rgba(59, 130, 246, 0.5);
    color: var(--primary);
    border-radius: 1rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.2s;
}

.add-link-card:hover {
    background: rgba(59, 130, 246, 0.1);
}

.auth-container {
   /* min-height: 100vh;*/
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 4rem 2rem 2rem 2rem;
    background: url('https://images.unsplash.com/photo-1462331940025-496dfbfc7564?q=80&w=2048&auto=format&fit=crop') no-repeat center center fixed;
    background-size: cover;
}

.auth-box {
    background: rgba(15, 23, 42, 0.85);
    padding: 2.5rem;
    border-radius: 1rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--card-border);
    border-radius: 0.5rem;
    color: white;
    box-sizing: border-box;
}

.btn {
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: bold;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-ghost {
    background: transparent;
    color: white;
    border: 1px solid var(--card-border);
}

.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #0f172a;
    padding: 2rem;
    border-radius: 1rem;
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--card-border);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #0f172a;
    border: 1px solid var(--card-border);
    border-radius: 0.5rem;
    padding: 0.5rem 0;
    min-width: 150px;
    z-index: 50;
}

.dropdown-menu.active {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: white;
    text-decoration: none;
}

.dropdown-menu a:hover {
    background: rgba(255,255,255,0.1);
}
