/* Shared styles for all pages */
html, body { 
    height: 100%; 
    margin: 0; 
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; 
    color: #111; 
}

/* Header styles */
h1 { 
    margin: 0; 
    padding: 12px 24px; 
    font-size: 18px; 
    font-weight: 500; 
    color: #666; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 1px solid #eee; 
}
.user-info { 
    font-size: 13px; 
    font-weight: normal; 
    color: #888; 
}

/* Common button styles */
button { 
    padding: 8px 12px; 
    border: 1px solid #0b5; 
    background: #0c6; 
    color: #fff; 
    border-radius: 6px; 
    cursor: pointer; 
}
button.secondary { 
    background: #eee; 
    color: #111; 
    border-color: #ccc; 
}

/* Common input styles */
input[type="text"], input[type="url"] { 
    padding: 8px 10px; 
    border: 1px solid #ccc; 
    border-radius: 6px; 
    min-width: 260px; 
}
input[type="number"] { 
    padding: 8px 10px; 
    border: 1px solid #ccc; 
    border-radius: 6px; 
    width: 80px; 
}
select { 
    padding: 8px 10px; 
    border: 1px solid #ccc; 
    border-radius: 6px; 
    min-width: 160px; 
    background: white; 
    cursor: pointer; 
}

/* Modal styles */
.tag-modal, .add-link-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.tag-modal-content, .add-link-modal-content {
    background: white;
    padding: 24px;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 60vh;
    overflow-y: auto;
}
.add-link-modal-content {
    max-width: 700px;
}
.tag-modal h3, .add-link-modal h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    color: #333;
}
.tag-modal label, .add-link-modal label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}
.tag-modal input[type="text"], .add-link-modal input[type="text"],
.tag-modal input[type="url"], .add-link-modal input[type="url"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 16px;
    box-sizing: border-box;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    /* Reduce body margins */
    body { margin: 12px; }

    /* Header adjustments */
    h1 {
        font-size: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .user-info { 
        font-size: 12px; 
        margin-top: 4px; 
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        align-items: center;
    }

    /* Modal adjustments */
    .tag-modal-content,
    .add-link-modal-content {
        padding: 16px;
        width: 95%;
        max-width: 95%;
        max-height: 70vh;
    }
    .tag-modal h3,
    .add-link-modal h3 {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    body { margin: 8px; }
    h1 { font-size: 14px; }

    /* Reduce modal padding further */
    .tag-modal-content,
    .add-link-modal-content {
        padding: 12px;
    }
}
