/* Global reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
    color: #f4f6fb;
    -webkit-font-smoothing: antialiased;
}

body {
    background: #020817;
    background-image: url('/unnamed.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(255,255,255,0.10), transparent 45%),
                radial-gradient(circle at bottom right, rgba(0,0,0,0.65), rgba(0,0,0,0.95));
    backdrop-filter: blur(6px);
}

.app {
    position: relative;
    z-index: 1;
    height: auto;
    min-height: 100vh;
    width: 100vw;
    padding: 16px 16px env(safe-area-inset-bottom, 16px) 16px;
    display: flex;
    align-items: stretch;
    justify-content: center;
}

.shell {
    width: 100%;
    max-width: 1200px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(145deg, rgba(5,10,30,0.92), rgba(3,6,18,0.96));
    box-shadow:
        0 30px 80px rgba(0,0,0,0.7),
        0 0 0 1px rgba(255,255,255,0.02);
    display: flex;
}

.sidebar {
    flex: 0 0 260px;
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid rgba(255,255,255,0.05);
    background: radial-gradient(circle at top left, rgba(255,255,255,0.04), transparent 55%);
    align-items: flex-start;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-mark {
    width: 120px;
    height: 120px;
    border-radius: 0;
    background: none;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    padding: 0;
    cursor: pointer;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-text-main {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand-text-sub {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    opacity: 0.7;
}

.contact-block {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    font-size: 13px;
}

.contact-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    opacity: 0.6;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.9;
}

.contact-item span {
    word-break: break-all;
}

.contact-icon {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #e5e7eb;
    flex-shrink: 0;
}

.contact-socials {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.contact-socials a {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #e5e7eb;
    text-decoration: none;
    background: radial-gradient(circle at 30% 20%, rgba(148,163,184,0.3), rgba(15,23,42,0.9));
    transition: transform 0.18s ease-out, box-shadow 0.18s ease-out, border-color 0.18s ease-out, background 0.18s ease-out;
}

.contact-socials a:hover {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 8px 20px rgba(15,23,42,0.7);
    border-color: rgba(248,250,252,0.9);
    background: radial-gradient(circle at 30% 20%, rgba(248,250,252,0.45), rgba(15,23,42,0.95));
}

.footer-note {
    font-size: 11px;
    opacity: 0.7;
    line-height: 1.5;
}

.main {
    flex: 1 1 auto;
    padding: 18px 16px 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.main-title-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.main-title {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.main-subtitle {
    font-size: 12px;
    opacity: 0.7;
}

.badge-pill {
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.6);
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: radial-gradient(circle at 0 0, rgba(148,163,184,0.3), transparent 60%);
}

.badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34,197,94,0.28);
}

.projects-wrapper {
    flex: 1 1 auto;
    border-radius: 14px;
    border: 1px solid rgba(148,163,184,0.25);
    background: radial-gradient(circle at top, rgba(15,23,42,0.9), rgba(2,6,23,0.98));
    box-shadow: inset 0 0 0 1px rgba(15,23,42,0.6);
    padding: 12px;
    display: flex;
    flex-direction: column;
}

/* Slow floating animation for project bubbles */
@keyframes floatBubble {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
    100% {
        transform: translateY(0);
    }
}

/* Form to add external projects */
.add-project-form {
    margin: 4px 0 8px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
    font-size: 12px;
}

.add-project-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.add-project-row--code {
    max-width: 260px;
}

.add-project-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.6);
    background: rgba(15,23,42,0.9);
    color: #e5e7eb;
    font-size: 12px;
    outline: none;
}

.add-project-input::placeholder {
    color: rgba(148,163,184,0.8);
}

.add-project-button {
    flex: 0 0 auto;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(22,163,74,0.9);
    background: radial-gradient(circle at 20% 0, rgba(34,197,94,0.9), rgba(22,163,74,0.95));
    color: #022c22;
    font-weight: 600;
    font-size: 11px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(22,163,74,0.7);
}

.add-project-button:active {
    transform: translateY(1px);
    box-shadow: 0 4px 10px rgba(22,163,74,0.7);
}

.projects-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(148,163,184,0.7) transparent;
}

.projects-scroll::-webkit-scrollbar {
    width: 6px;
}

.projects-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.projects-scroll::-webkit-scrollbar-thumb {
    background-color: rgba(148,163,184,0.7);
    border-radius: 999px;
}

.projects-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
}

.project-bubble-form {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
}

.project-bubble {
    position: relative;
    flex: 1 1 calc(33.333% - 12px);
    min-width: 150px;
    max-width: 210px;
    padding: 14px 14px 16px 14px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 10%, rgba(248,250,252,0.2), rgba(15,23,42,0.98));
    border: 1px solid rgba(148,163,184,0.7);
    box-shadow:
        0 14px 28px rgba(15,23,42,0.85),
        0 0 0 1px rgba(15,23,42,0.9);
    text-decoration: none;
    color: #e5e7eb;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    transition: transform 0.15s ease-out,
                box-shadow 0.15s ease-out,
                border-color 0.15s ease-out,
                background 0.15s ease-out,
                opacity 0.15s ease-out;
    animation: floatBubble 7s ease-in-out infinite;
}

.project-bubble::after {
    content: '';
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(circle at 10% 0, rgba(56,189,248,0.4), transparent 55%),
        radial-gradient(circle at 90% 90%, rgba(45,212,191,0.4), transparent 55%);
    opacity: 0;
    transition: opacity 0.18s ease-out;
    pointer-events: none;
}

.project-bubble:hover {
    transform: translateY(-3px) scale(1.02);
    border-color: rgba(248,250,252,0.9);
    box-shadow:
        0 24px 50px rgba(15,23,42,0.9),
        0 0 0 1px rgba(56,189,248,0.35);
    background: radial-gradient(circle at 20% 0%, rgba(248,250,252,0.32), rgba(15,23,42,0.97));
}

.project-bubble:hover::after {
    opacity: 0.75;
}

.project-icon-pill {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 20%, #22c55e, #0ea5e9 45%, #0f172a 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #020617;
    font-size: 18px;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(15,23,42,0.8);
}

.project-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.project-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

.project-url {
    font-size: 11px;
    opacity: 0.7;
}

.project-arrow {
    margin-left: auto;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.7);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0.9;
    background: radial-gradient(circle at 30% 20%, rgba(148,163,184,0.4), rgba(15,23,42,0.95));
}

/* Botón para eliminar proyectos externos (solo en modo admin) */
.project-delete-button {
    position: absolute;
    top: 4px;
    right: 6px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 1px solid rgba(239,68,68,0.9);
    background: rgba(127,29,29,0.98);
    color: #fee2e2;
    font-size: 12px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease-out, transform 0.15s ease-out, box-shadow 0.15s ease-out;
}

body.admin-mode .project-delete-button {
    opacity: 1;
    pointer-events: auto;
}

.project-delete-button:hover {
    transform: scale(1.06);
    box-shadow: 0 0 0 2px rgba(248,113,113,0.5);
}

/* Green "in progress" external project bubbles */
.project-bubble--external {
    background: radial-gradient(circle at 30% 10%, rgba(74,222,128,0.35), rgba(5,46,22,0.98));
    border-color: rgba(34,197,94,0.9);
    box-shadow:
        0 16px 32px rgba(22,163,74,0.7),
        0 0 0 1px rgba(22,163,74,0.8);
}

.project-bubble--external .project-icon-pill {
    background: radial-gradient(circle at 30% 20%, #bbf7d0, #22c55e 45%, #052e16 100%);
    color: #022c22;
}

.project-bubble--external .project-arrow {
    border-color: rgba(187,247,208,0.9);
    background: radial-gradient(circle at 30% 20%, rgba(74,222,128,0.7), rgba(5,46,22,0.98));
}

.project-bubble--external:hover {
    border-color: rgba(190,242,100,0.95);
    background: radial-gradient(circle at 20% 0%, rgba(190,242,100,0.55), rgba(5,46,22,0.98));
}

.empty-state {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 13px;
    opacity: 0.8;
}

.empty-pill {
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px dashed rgba(148,163,184,0.7);
    background: rgba(15,23,42,0.9);
}

/* removed file viewer styles from this file; moved to file_viewer.css */

